|
|||||||||||||||||
What is the recommended method for passing parameters?Download PDF version of this faq: Parameters.pdf The preferred and recommended method for setting a parameter value is "AddParameterCurrentValue". This method takes 3 arguments and they are:
// set parameter string datatype Once the parameter value has been specified the "GetNthParameterCurrentValue" method can be used to get the value back. This method retrieves the nth current value of the specified multivalue parameter. It takes 3 arguments namely:
PCREValueInfo valueInfo = ajob.GetNthParameterCurrentValue(“fieldname”, “”, (short)0); If the parameter is in the main report then an empty string needs to be passed. If the parameter is in the subreport then the sub-report name needs to be passed. If your application tries to get a parameter value before the parameter value has been set it will generate an error similar to the following: Sample Dynalivery has created the simplest sample possible for showing the preferred method for setting parameter values. We have created a report file that takes 7 parameters. We have set default values for some of the parameters in the report. The java code provided with this sample uses AddParameterCurrentValue method to programmatically change the value of the parameters. To use this code be sure to modify the SimpleAppParam.java file to reflect your report server name, the location of the .rpt file and the output path. Download sample from here. This table maps SQL server data types with the corresponding Crystal data types.
|
||||||||||||||||||||||
| BACK TO TOP BACK TO START |
|