Skip to Content
avatar image
Former Member

Parameter Prompting order on Crystal Reports Viewer

I am using the CrystalReportViewer to display reports from within a J2EE application. We create the reports external to the development environment using Crystal Reports 11.

All seems to work well except for a problem in the way that run-time parameters are displayed in the viewer panel. The problem is that the parameter order that we define in the report, and which is displayed as expected when the report is run in Crystal Reports itself, is not reflected on the viewer.

For example, our paramaters for a given report may be in this order:

From Date

To Date

Minimum Value

But when the report is executed through the viewer on a jsp page, we may see those same three parameters prompted like this:

To Date

Minimum Value

From Date

This is just an example of course, but in a complex report, with many associatted parameters, this somewhat random reordering makes the parameter list very difficult to comprehend.

Can anyone offer a method by which we can keep the display order consistent?

Best regards,

Chuck Doherty

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 14, 2009 at 04:34 PM

    I have a similar problem. In my case, I am not using the viewer; I am generating the parameters form myself by using the Report API to open the report and go through the parameters, something like this:

    Fields reportFields = reportClientDocument.getDataDefinition().getParameterFields();

    for(Object f : reportFields) {

    ParameterField currentField = (ParameterField) f;

    // Process the field...

    }

    But the fields are not returned in the order they are defined in Crystal Reports designer. I suspect that the JSP viewer just uses something similar to the above behind the scenes, and therefore this should be a bug in the Report SDK.

    Does anyone have any solution for this?

    Artur Matos

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 08, 2010 at 02:22 PM

    This is the same issue I am having - I has 3 parameters to start, the added additional parameters that I wanted to show first. They are properly formatted & ordered in the Record Selection, but do not display in the neccesary (same order) when the report is run. I really don't want to have to remove the existing parameters, start with only the ones I want first and the add the others back in. NOT a good way of having to do things

    (WinXP/XIr2)

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded