cancel
Showing results for 
Search instead for 
Did you mean: 

@PluginSubReport - how to use it correctly?

Occasional Contributor

@PluginSubReport - how to use it correctly?

I created my own subreport, I successfully added it to readyapi, but I can not use it because of an error:

 

Caused by: net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :1. Parameter not found : MySubReport2

 

how to use it correctly?

4 REPLIES 4
Occasional Contributor

Re: @PluginSubReport - how to use it correctly?

repaired:

language="groovy"  ->  "java"

+ <parameter name="MySubReport2" class="com.eviware.soapui.reporting.reports.support.ExportableJRBeanCollectionDataSource"/>

 

 

Now there is no error, but the report is generated empty

???
 

Highlighted
Moderator

Re: @PluginSubReport - how to use it correctly?

Hello,

 

Do you have a reference to your DataSink in the report template?

Example:

<dataSourceExpression>$P{YourDataSinkName}</dataSourceExpression>
<subreportExpression class="java.lang.String">"subreport:MySubReport2"</subreportExpression>

 

More info on this can be found here: https://support.smartbear.com/readyapi/docs/testing/reports/datasink/printable.html

Natalie
Customer Care Team

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: @PluginSubReport - how to use it correctly?

judging by the documentation: https://support.smartbear.com/readyapi/docs/configure/plugins/dev/annotations/misc/subreport.html

 

SubReport creates a custom SubReport data source to provide custom data for reporting.

 

I would like to use it as a data source.

 

How can the native data source be used in the jasper report? (for example in the documentation)

Occasional Contributor

Re: @PluginSubReport - how to use it correctly?

in the report script on the testcase, executed the report.getSubReports (). each {log.info it}.
List of objects created subreport:

 

com.eviware.soapui.reporting.reports.common.ModelItemPropertiesSubReportFactory$ModelItemPropertiesSubReport@37bc45c9
com.eviware.soapui.reporting.reports.common.TestPropertiesSubReportFactory$TestPropertiesSubReport@204df4f8
com.eviware.soapui.reporting.reports.common.MetricsSubReportFactory$MetricsSubReport@4921f480
com.eviware.soapui.reporting.reports.common.ReportPropertiesSubReportFactory$ReportPropertiesSubReport@7e70c878
com.eviware.soapui.reporting.reports.testcase.TestStepsSubReportFactory$TestStepsSubReport@2b375872
com.eviware.soapui.reporting.reports.testcase.TestCaseRequirementsSubReportFactory$TestCaseRequirementsSubReport@649293d8
com.eviware.soapui.reporting.reports.testcase.TestStepResultsSubReport@22d1fe3e
com.eviware.soapui.reporting.reports.testcase.FailedTestStepsSubReportFactory$FailedTestStepsSubReport@5a1ac114
com.eviware.soapui.reporting.reports.testcase.TestCaseJUnitSubReportFactory$TestCaseJUnitSubReport@4bffe6ed
com.eviware.soapui.reporting.reports.testcase.TestCaseResultSubReportFactory$TestCaseResultMetricsSubReport@3b83a019
com.eviware.soapui.reporting.reports.testcase.TestCaseDataSinkSubReportFactory$DataSinkStepsSubReport@160e9959
com.eviware.soapui.reporting.reports.coverage.TestCaseCoverageSubReportFactory$TestCaseCoverageSubReport@1a10e8ed
com.smartbear.ready.reporting.reports.testcase.TestStepParametersSubReport@2eecadcc

 

MySubReport is not in the list, accordingly the object of my plugin is not initialized. Because of what it can be?

New Here?
Join us and watch the welcome video:
Watch the New Interview
7Mistakes
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win