cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress field in header

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

former_member260594
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

former_member260594
Active Contributor
0 Kudos

I'm not too familiar with VB but in the stand alone Report Designer you would right click on the object you want to suppress > Format Field > Common Tab click on the X+2 button and enter in the conditional formula

Former Member
0 Kudos

I knew it was something easy! Thank you so much for your help!

Answers (0)