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!

Dynamic Array for running totals or Subreport nightmare 1

Status
Not open for further replies.

CRWriter

Programmer
Feb 16, 2005
9
US
Hi!
Thanks for reading this. I currently have a report that has 4 subreports in it. The data in the subreports is summary data of one of the groups that I can't sum up in the group footer:
$ Qty
Grp 1 District
Grp 2 Branch
Grp 3 Bldg
So my first subreport is totalling values for grp 3 for the district. In this subreport I'm pulling in all the same data, I'm just not grouping on District and Branch. That works fine except for the fact it takes hours for the report to run.

I wanted to create a dynamic array where I could list the different branches in the district footer with their values but I only get the last value in the array when I display the array, ex. myarray[1]; myarray[2]; I would only get the value in myarray[2].
Any ideas? Thanks!
 
Rather than stating the architecture to use, you're probably better served to post technical information and requirements:

Crystal version
Database/connectivity used
Example data
Expected output

Descriptions leave too much to the imagination.

If you want to display everything in an arrya, use:

join({MyArray},",")

Subreports are generally a bad idea, try using a Stored Procedure on the database for optimal performance.

Anyway, hopefully this will work for you if you've successfully created the array.

-k
 
I knew I forgot something. Crystal 8.5, Oracle 8.i

sample:

group1 group2 group3 group4
district Customer Sales Group Prod Fam
AE 1 I8 P9
AE 2 I8 P9
AE 3 I7 Q8

The trouble I'm having is summing group4 and group3
without the data being separated by group2
 
Sounds like you don't understand how SQL and Crystal work.

A group within a group will always demonstrate the subset data of it's parents grouping, that's the purpose of a group.

It sounds like you want grand totals, not groups.

Since your sample data doesn't show any values to sum, what aggrgate are you using and against what.

If you pay closer attention to my request, you'll note that it's very logical, I ask for examploe data, and expected output. Once you show what you have, and the intended result from that sample dtaa, it's easy to work around people's tendency to try to describe data rather than just post requirements.

Anyway, just use grand totals, doesn't sound like you want groups.

-k
 
Thanks for your response. I understand about the subsets of data within the group. In order to by-pass that issue I have created subreports that gather the same data and just sort and group it differently. I end up with 4 subreports in one report. It takes too long for it to run so I'm trying to find alternative ways of getting this data.
 
If the data already exists in the main report, then you might use cross-tabs instead in the report footers.

Or, don't use any groupings in the report an creat4e manual cross-tabs for each of the different slices of the data. That means creating manual formulas for each metric.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top