BusinessObjects Enterprise XI R2 BIPlatform Web Services – How do you Determine If a Parameter is Used in a Crystal Report?

[] [] [] []

Related:

  1. Should the @Clustername be Used When Logging On using BusinessObjects Enterprise XI Release 2 Java SDK?Symptom Logon using the CMS cluster name (@clustername) fails with...
  2. How to run the BusinessObjects servers on domain account?Symptom BusinessObjects Enterprise (BOE) services run under the ‘localsystem’ account...
  3. How to configure XI 3.1 Query Builder tool to communicate to BusinessObjects Enterprise using SSL?Symptom BusinessObjects Enterprise XI 3.1 servers configured to use SSL...
  4. How to hide the Information OnDemand icon/link in BusinessObjects XI Release 2 Service Pack 3 InfoView on WebSphereSymptom How to hide theInformation OnDemandicon/link in BusinessObjects XI Release...

Symptom
BusinessObjects Enterprise XI Release 2 BIPlatform Web Services Java Consumer ApplicationSchedule a Crystal Report with ParametersThe crystalReport.getPluginProcessingInterface().getReportParameters().getParameters() returns all parameter fields in the report, whether they are used or not.How do you determine whether a parameter is being used in the report?
Resolution
Look in the ReportParameterOptions collection to see if ReportParameterOptionEnum.IS_NOT_USED is present.?If it is present, then the parameter is not used in the report.?Sample code:
 ?CrystalReport report = (CrystalReport) infoObjects.getInfoObject(0); ?ReportParameter[] params = report.getPluginProcessingInterface().getReportParameters().getParameters(); ?for(int i = 0, m = params.length ; i < m ; i++) {
   ?ReportParameter parameter = params[i];
   ?ReportParameterOptions reportParameterOptions = parameter.getReportParameterOptions();
   ?boolean is_used = true;
   ?if(reportParameterOptions != null) {
     ?ReportParameterOptionEnum[] options = reportParameterOptions.getReportParameterOption();
     ?for(int j = 0, n = options.length ; j < n ; j++) {
       ?if(ReportParameterOptionEnum.IS_NOT_USED.equals(options[j])) {
         ?is_used = false;
         ?break;
       ?}
     ?}
   ?}
   ?out.println("Is Used: " + is_used +"<BR>");
   ?out.println("<BR>");
 ?}

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment