Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3 Report Variations 1 Report 1

Status
Not open for further replies.

MikeyPugs

Programmer
Sep 13, 2002
3
CA
I have 1 report with 3 different variations. All use the same fields from the same table. Each variation is grouped differently and the diplayed information is re-ordered differently in each variation.

What is my most effective choice for completing this?

Thank you.
 
Does this mean that it's sorted differently, or that the fields are in different places?

You might accomplish all of this in one Crystal Report, with a parameter that determines how it's grouped, and what fields are displayed where.

The theory is:

Create formulas to use for the grouping based on the parameter choice:

Here's an example of group 1
select {?ReportType}
case "1": totext({Customer.Postal Code})
case "2": {Customer.Country}
etc...

Where you get in trouble is converting numerics to text, because the text equivalent of a numeric does NOT sort properly, hence the groups will be out of sequence.

I tend to avoid a single report for groupings with different data types for this reason.

As for displaying fields in different places, you can create multiple sections (right click and select insert section), and place the columns in the proper order in as many sections as is required, then base the suppression of those sections on the parameter.

Otherwise, you can create one report, and then save it under the other 2 names, then open those up and adjust as required, often times this has advantages because one of the three may end up requiring a change beyond the scope of the other 2 reports.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top