cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine if a parameter is actually being used in the crystal report

Former Member
0 Kudos

We are migrating from an old Visual Basic 6.0 Crystal SDK to the Java SDK. In the VB API, a parameter field obtained from crxReport.ParameterFields has a variable "needsCurrentValue". A false value told you the parameter was not used on the report.  I don't see an equivalent of this in the Java SDK. I have an issue where all parameters are returned via:

Fields<IParameterField> myFields = dataDefController.getDataDefinition().getParameterFields() even if some of the fields are not used in the report. The legacy system passes only parameters that are used and using "needsCurrentValue", we would skip over those params that were "false". I cannot find a way to detect that a parameter is not being used in the Java SDK. Does anyone know how?

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

In the IReportParameter class, there is a method isInUse() that you can use to determine this.

-Dell


Former Member
0 Kudos

Thanks, Dell.  In the SDK I am using, that class is not available.  Attempted to search for an updated SDK but not having any luck.  Do you know where I would find the SDK that has the required class?

DellSC
Active Contributor
0 Kudos

This is in the 4.1 SDK and I'm importing com.crystaldecisions.sdk.plugin.desktop.common.IReportParameter so I can use it.

What version are you using?

-Dell

Former Member
0 Kudos

We are using "SAP Crystal Reports for Java runtime components - Java Reporting Component (JRC)" that is available using url http://scn.sap.com/docs/DOC-29757.  The downloaded zip file associated with this is crjava-runtime_12.2.218.zip. These jar files associated with these components are downloaded to a workstation and used with a Java Swing Web Start application.  Is the SDK you mention for server side only?

DellSC
Active Contributor
0 Kudos

Because of the space you posted in, I assumed you were working with the full BusinessObjects SDK, not Crystal for Eclipse SDK.  Please repost your question in the Crystal for Eclipse space here:  http://scn.sap.com/community/crystal-reports-for-eclipse.  Someone there should be able to direct you to what you need.

-Dell

Former Member
0 Kudos

Thank you for taking the time to look into this.  I will re-post.