Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reordering a Crystal report programmatically
Message
From
16/01/2001 01:57:23
Walter Meester
HoogkarspelNetherlands
 
 
To
16/01/2001 00:57:58
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00464082
Message ID:
00464098
Views:
25
Dragan,

First of all, I haven't worked with version 6.0 very much, so I'll tell what I do in this situation with version 7.

In your report, Crystal automaticly sets the grouping in ascending order. You can set it to "original order". This way the records are printed in the order you specified in your FOX2X tables.

You can pass a boolean parameter, in which you specify which sorting mechanism you want to use. Use this boolean parameter to conditionally print secions. You can make two different sections for each band (one for grouping unit, on for person).

The only thing you need to do in your program is to pass the boolean variable with the ParameterFields property. (see your developer.hlp) for the syntax.

As I said, I don't know if this can be implemented in CR 6.0. For more flexibility you may want to use CR 8.0 and the RDC automation server to handle your reports.

Walter,


>Here's the setup: I have a long and complicated Crystal report with subreports. Regularly, it's printed in a certain order (organizational unit, person, person's documents). Now, I have a filter builder where they may pick one single person, and then this ordering doesn't make sense anymore - it's not doomed to be delivered by units anymore, it's personal delivery now, and having one person's documents ordered by unit first and reprinting the lead-in page several times, just because a person has several documents pertaining to each unit doesn't cut it now.
>The method we use to print it is to have a CR ActiveX object (version 6, unfortunately) on the form, create a flat cursor with everything needed, copy it into a fox2x table (and as many it takes for each subreport), tell the object which report to open, which files to use for data, and then just print.
>
>Now, what I would like to do before the "and then just print" bit, is to change the expression used to define the outer and intermediate level grouping (i.e. the "group by" expressions), or even to replace the things printed in the group headings.
>
>If this is not feasible, I've got a few workarounds, but I already don't like them. If anyone has at least the exact names of the properties I'd have to set, even that would mean a lot. CR's help is worse then VB's, since they had several programming interfaces (API, OCX and the automation object) and you never know where to look for what you need.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform