on 05-21-2009 10:58 AM
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
Hi,
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++)
out.println(fields.getField(i).getName());
Please let me know the results.
Thanks,
Neeraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neeraj,
I've tried what you said, but the results are still the same.
The interesting thing is that changing the order in Crystal Reports designer does affect the ordering returned to the iterator in the code, is just that the ordering is not the same (albeit slightly similar).
Regards,
Artur
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.