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!

Generating a particular group header + all details multiple times

Status
Not open for further replies.

leenabhanot

Programmer
Mar 19, 2001
8
US
Hi, I am using CR7. As of now I have
Group1 - Account number
Group 1 header - subreport for a "summary of charges of all customers"
group2 - cc Customer
group2 footer - subreport for 1 cc customer for 1 account number.

The way this works is 1 account number can have multiple cc customers. The second subreport has to be generated for all cc customers and the 1st one only once for the parent account.
The problem is that each cc customer will require a certain number of copies of the second subreport.
I have no idea how to generate this. I was thinking of using VB for this. In that case using loops, I can generate subreport1 for a customer and then generate subreport2 for one of his cc customers and then within that generate multiple copies of subreport2 for that cc customer. Then just go back and get the next cc customer and generate however many copies he wants.
For this I would have to write an sql query and store the list of all customers in order to process them 1 by 1.
I don't really know how to do this within VB.
Also, is there any way I can support my requirement within crystal reports itself. Maybe going to Crystal 8?
I would really appreciate any feedback.
Thanks a lot.
 
if you have more than one GF2, and you put the same subreport in each, you can generate it multiple times. How many times do you need it for each customer? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks, we need it to be generated a variable number of times depending upon how many times each customer has requested each invoice. This value is stored in a database field for each cc customer and can change in the database at any time
 
OK, say the max that you allow is 10.
Create 10 GFs A - ? and put a subreport in each. Then suppress each with a different condtion that says:

A) (no condition needed, prints every time)
B) {NumberRequired} > 1
C) {NumberRequired} > 2
D) {NumberRequired} > 3...

Not very fast but that is the only way I can think of.
Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top