Jon,
Thanks for your suggestion! I ended up doing a trick that is commonly done with the VFP report writer, I created a detail set of rows in a temp table and a summary set, and then I appended them both into a temp table that had the columns of both and used a unique identifier for the group expression. I populated the group by expression for the values for the summary rows with 99999999, so they sorted after the detail section, which had values ranging from 1 to about 100.
The problem in this case was that the the set of subtotals had to appear as a group AFTER the detail set of rows, not with one subtotal per group, appearing in a group footer, as I think you were suggesting. Hope that makes sense.
>
>The actual query is far more complex than the above example, and may take a long time to run. I need two reports, one is a detail report, and one is subtotals. I know that I can write two SP's, that are identical except for one does an additional group by. But then, I have doubled the run time.
>>
>
>David,
>
>Why can't you have Crystal just read the one SP that produces the detail set and have Crystal take care of the subtotaling?
>
>If you need one report to be strictly summary without showing any detail, you can still accomplish this with one Crystal template file by using a parameter or formula field that you manipulate at runtime to tell the report whether or not you're running a detail or summary report. Design the report to have the detail and group footer/subtotals already there. Then you can have a conditional suppression formula on the details and groop footer sections evaluate what kind of report it is based on the value of that formula/parameter field.
>
>So, if it's a detail report then suppress the group footer section and un-suppress the detail section. Vice-versa for a summary report.
>
>This is exactly how I go about it for a similar situation. That way I can stick with just one Crystal file whose behaviour I can change at runtime.
>
>Hope that helps.
>
>Laterness,
>Jon
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only