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

Problem with Conditional Format of Currency Symbol in Group

Status
Not open for further replies.

rmg1

Technical User
Sep 2, 2012
13
US
I am using CR2008 and am having problems in conditioning the currency symbol for groups.

Group1 = Sales Category (GH1 - Print this)
Group2 = Ship Date (only print dates with GF3)
Group3 = Order Number (GF3 - Print amount on this line)

I need to print the "$" symbol for the 1st Order Number of the Sales Category (skipping group 2 here completely). It also needs to print at the top of each page when a Sales Category continues on another page. For example:

Category-Date-Order#-Print $-Amount
-- A -- 1/1/13 - 1 --- $ ----- 2
-- A -- 1/8/13 - 5 --- ----- 1
-- B -- 1/2/13 - 3 --- $ ----- 4
-- B -- 1/2/13 - 4 --- ----- 6

Created 2 formulas :

Formula [highlight #FCE94F]GrpCnt[/highlight]: (This is in GF3)
whileprintingrecords;
numbervar GrpCnt := GrpCnt + 1;

Formula [highlight #FCE94F]ResetGrpCnt[/highlight]: (This is in GH1 and PF)
whileprintingrecords;
numbervar GrpCnt :=0;

On Amount field, I have [highlight #FCE94F]Enable Currency Symbol[/highlight]:
whileprintingrecords;
numbervar GrpCnt;
if GrpCnt =1 then crFixedCurrencySymbol
else crNoCurrencySymbol;

[highlight #FCE94F]One Symbol Per Page[/highlight]: box is checked

The Currency Symbol appears at the top of the page from page 2 to ending page. Why does the group code not work?
 
Not sure I understand. is the problem that you are not getting the $ on the first page.

I see that the variable which controls this (GrpCnt) is set to 0 in GH1 only being incremented beyond 0 in GF3. I am guessing this is the reason why the $ doesn't appear until after the first GF3 of from he next page.

Try changing {@ResetGrpCnt} formula to:

Code:
whileprintingrecords;
numbervar GrpCnt := 1;

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top