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!

Conditional Format of $CurrencySymbol in Groups and at top of page

Status
Not open for further replies.

rmg1

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

Group1 = Sales Category
Group2 = Ship Date
Group3 = Order Number

I need to print the $ symbol for the 1st Order Number of the Sales Category (skipping group 2 here completely). For example:
Category Date Order# Amount
A 1/1/13 1 $ 2
1/8/13 5 1
B 1/2/13 3 $ 4
1/2/13 4 6

Also need to print the $ at the top of the succeeding pages.

Created 2 formulas :
Grp3Cnt: whileprintingrecords;
numbervar Grp3Cnt := Grp3Cnt + 1;
ResetGrp3Cnt: whileprintingrecords;
numbervar Grp3Cnt :=0;
Grp3Cnt is in GF3
ResetGrp3Cnt is in PF

Enable Currency Symbol: whileprintingrecords;
numbervar Grp3Cnt;
if Grp3Cnt =1 then crFixedCurrencySymbol
else crNoCurrencySymbol;

One Symbol Per Page: box is checked

The only place where the Currency Symbol appears is on the 3rd page of the report and nowhere else. What am I doing wrong?
 
One more thing...I am printing GF1 (Sales Category) with a heading for the order number information (GF3)
 
OOPS! This is in Crystal 2008, not 8!
 
I'd recoment a completely different method. Group by category. Do a running total count on some suitable field within the category. Use it for a formula field:

Code:
If @Itemcount = 1
then "$"
else " "

I've not used crFixedCurrencySymbol, possibly it would be better than "$".

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

Worth getting to know them. Do some test reports to get familiar with them: you'll find they save a lot of time.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top