on 10-07-2008 3:56 PM
I feel like there should be a simple solution for this but I am having the hardest time figuring it out. I am using crystal report 9 and there is a group header that contains the account number and beginning balance. I want to show the account number at the beginning of each page if the transactions exceed one page, however I only want to show the beginning balance on the first page of the transaction list by account. I want to somehow suppress the field showing the begining balance until a new account number is reached. Here is an example of the layout of the report:
--PageHeader
Account Balance
--GroupHeader1
1191-0041 1,000.00
--Detail
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
end of page 1
page 2
--GroupHeader1
1191-0041
--Detail
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
--GroupFooter
ending balance
end of page 2
page3
--groupheader1
1193-0001 2,000.00
--Detail
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
xx xxxx xxxx xxxx xxxxx
I hope this makes sense, but this is how I want it to be laid out noticing that on page 2 the account number is the same as page one therefore the balance is suppressed but when you get to page 3 there is a new account so the balance is shown.
I'm used to designing reports in Access where there is an onchange event of the header, is there anything like that in crystal reports? Does anyone have suggestions on how to accomplish what I want to accomplish?
Thank you in advance!
Jamie,
How you do this will depend on whether or not there is a one to one relation between the account and the beginning balance or a one to many relation.
If it is one to one then you can conditionally suppress the beginning balance with a form similar to;
= previous()
If there is a one to many relation (the balance displayed on page 2 differs from that on page 1 for the same account) then you will need to set up a counter formula in the Group Header;
WhilePrintingRecords;
Numbervar X:= X + 1
and reset the counter in the Group Footer;
WhilePrintingRecords;
Numbervar X:= 0
You could then conditionally suppress the beginning balance when X is greater than 1.
Numbervar X;
X > 1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I probably should have been a bit more specific about how the balance is populated. The Balance is a field I look up based on the transaction year, so it is a text box in the header that I populate through code during the format event of the header. I look up the balance based on the account. The report is created using Visual Basic 6.0.
Each account will have its own beginning balance. I think your answer could be helpful but I'm not sure where I would put this check. I'm not a very experienced user of crystal so please forgive my lack of knowledge.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.