I have a a/c No. field for each item in the detail section.
For example:
Item
---------------------------------------
T Shirt
a/c: 6587-36580-9873-0000-0000
Poster
a/c: 6587-36580-9873-0000-0000
Brochure
a/c: 6587-36580-9873-0000-0000
Pens
a/c: 6587-36580-9873-0000-0000
If the a/c number is the same for all the items, then I want to display it at the top in the
page header section and suppress a/c in the detail section so that a/c no is displayed only once.
If a/c number is not the same for all line items, then display a/c no. at the detail section like above
and not show a/c number in the page header section.
To do this, I inserted three formula fields called @SameGL, @FlagSameGL and @EndSameGL.
I put @sameGL in the page header section, @FlagSameGL on the detail and @EndSameGL on the group footer
section.
Formula @sameGL has the following formula:
WhilePrintingRecords;
booleanVar sameGL := true
Formula @FlagsameGL has the following formula:
WhilePrintingRecords;
booleanVar sameGL ;
//If OnFirstRecord then //First record does not have a previous.
If {tglAccount.GLAcctNo} <> Next ({tglAccount.GLAcctNo}) Then
sameGL = false //Current and Next are matches
else If OnLastRecord Then //Last record does not have a Next.
If Previous( {tglAccount.GLAcctNo}) <> {tglAccount.GLAcctNo} Then
sameGL = false //Previous and Current 'match'.
Else If Previous( {tglAccount.GLAcctNo}) <> {tglAccount.GLAcctNo} OR {tglAccount.GLAcctNo} <> Next ( {tglAccount.GLAcctNo}) Then
sameGL = false //Checks Prevoius and Next record against Current record. (True)
else
sameGL = true
Finally, @EndsamGL has the following formula.
booleanVar sameGL ;
Finally, on detail section which shows the GL a/c, I did format section and suppressed this detail
section if boolean value for sameGL is true. However this method is not working. It shows GL a/c even
if the GL a/c no is same throughout the report.
Is there a different better way to do this? Thanks a lot.
For example:
Item
---------------------------------------
T Shirt
a/c: 6587-36580-9873-0000-0000
Poster
a/c: 6587-36580-9873-0000-0000
Brochure
a/c: 6587-36580-9873-0000-0000
Pens
a/c: 6587-36580-9873-0000-0000
If the a/c number is the same for all the items, then I want to display it at the top in the
page header section and suppress a/c in the detail section so that a/c no is displayed only once.
If a/c number is not the same for all line items, then display a/c no. at the detail section like above
and not show a/c number in the page header section.
To do this, I inserted three formula fields called @SameGL, @FlagSameGL and @EndSameGL.
I put @sameGL in the page header section, @FlagSameGL on the detail and @EndSameGL on the group footer
section.
Formula @sameGL has the following formula:
WhilePrintingRecords;
booleanVar sameGL := true
Formula @FlagsameGL has the following formula:
WhilePrintingRecords;
booleanVar sameGL ;
//If OnFirstRecord then //First record does not have a previous.
If {tglAccount.GLAcctNo} <> Next ({tglAccount.GLAcctNo}) Then
sameGL = false //Current and Next are matches
else If OnLastRecord Then //Last record does not have a Next.
If Previous( {tglAccount.GLAcctNo}) <> {tglAccount.GLAcctNo} Then
sameGL = false //Previous and Current 'match'.
Else If Previous( {tglAccount.GLAcctNo}) <> {tglAccount.GLAcctNo} OR {tglAccount.GLAcctNo} <> Next ( {tglAccount.GLAcctNo}) Then
sameGL = false //Checks Prevoius and Next record against Current record. (True)
else
sameGL = true
Finally, @EndsamGL has the following formula.
booleanVar sameGL ;
Finally, on detail section which shows the GL a/c, I did format section and suppressed this detail
section if boolean value for sameGL is true. However this method is not working. It shows GL a/c even
if the GL a/c no is same throughout the report.
Is there a different better way to do this? Thanks a lot.