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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Number

Status
Not open for further replies.

crystalabc

Technical User
Joined
Sep 1, 2005
Messages
9
Location
CA
Hi there,

I'm having a problem displaying group number.
I have multiple level groups, I want to display only the first level of group number but what's counted is actually the lowest level of group number.

This is what I got:

Group#1 GroupNumber 1
Group#2
Group#2
Group#1 GroupNumber 3

So at the first level, the group number counting is not continuous.

Anyone know how to fix this problem?

Many thanks
 
Hi,
Could you clarify ( with actual data if possible) what you are referring to by Group and Group Number. If Crystal Reports groups then how did you get 2 Group 2s ?

If you show what you expect to see and give some examples of the data and its structure, if may be clearer..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks for reply. Sorry for being unclear.
This is an example, I want to create invoices for the customers who ordered books and journals. I'm using Group Number as part of the invoice number to increase 1 for each customer.

What I want to get is something like this:

Group#1 CustomerA InvoiceNumber:1
Group#2 Books
details
Group#2 Journals
details

Group#1 CustomerB InoviceNumber:2
Group#2 Books
details
Group#2 Journals
details

But what I got from Crystal Reports is that the Invoice Number is "3", not "2", because it counts the groups in the lowest level.

 
Use a formula and place this in the group header section

//@Invoice Number
WhilePrintingRecords;
Shared Numbervar InvNo := InvNo + 1;

'InvoiceNumber:' + Cstr(InvNo,0)

HTH



Gary Parker
MIS Data Analyst
Manchester, England
 
Thanks a lot. It works... But my problems is still not solved yet. Using the above formula can only show the invoice number in the Group#1 header. I want to display the same invoice number on each of the detail pages, like this:

Group#1 CustomerA InvoiceNumber:1
(new page)Group#2 Books InvoiceNumber:1
details
(new page) Group#2 Journals InvoiceNumber:1
details

Group#1 CustomerB InoviceNumber:2
(new page)Group#2 Books InvoiceNumber:2
details
(new page)Group#2 Journals InvoiceNumber:2
details


Is it possible to do this?
 
Create a 2nd formula to display the current Invoice No

//@DisplayInvNo (place this wherever you need it)
WhilePrintingRecords;
Shared Numbervar InvNo;

'InvoiceNumber:' + Cstr(InvNo,0)

HTH




Gary Parker
MIS Data Analyst
Manchester, England
 
It's working like a charm. Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top