Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Retrieving report parameters with the same order as in CR Designer

For one application I am developing, I need to retrieve all the parameters fields defined on a crystal reports file, following the same order as defined in Crystal Reports Designer (that you can set by right clicking on Parameter Fields and choosing "Set Parameter Order"). I thought the following code, using Crystal Reports SDK, would do the trick:

Fields reportFields = reportClientDocument.getDataDefinition().getParameterFields();
for(Object f : reportFields) {
      ParameterField currentField = (ParameterField) f;
      // Process the field...

Unfortunately the fields are not returned using the same order. Is there any way to do this using the Crystal Reports SDK?

Artur Matos

Former Member


Please set the Parameter Order in the order you want through Set Parameter Order( like you did before).

Try the following code and do let me know the results:

Fields fields=reportClientDocument.getDataDefController().getDataDefinition().getParameterFields();

for(int i=0;i<fields.size();i++)


Please let me know the results.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question