Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Count based on a value of a calculated field Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
NedSchneebly
Newbie
Newbie


Joined: 09 Jul 2009
Location: Canada
Online Status: Offline
Posts: 23
Quote NedSchneebly Replybullet Posted: 13 Aug 2009 at 2:48pm
Originally posted by DBlank

Not that variables are my thing at all but did you use the whileprintingrecords in your GF1 formula statement?

Now that I have stepped way out of my comfort zone ... just use a RT. It only takes one field creation (with point and click so no typos) and you can use it to display on both the detail and group footer (without it adding the extra count in the footer!). Wink



I added WhilePrintingRecords; to the first formula, but count1 is still displaying as 0 in the third formula.

I have used Running Totals often, and they work fine, but the reason I am doing it this way is because I do not want to display the variables from running totals, but rather I want to run them through a formula first and have no bloody idea how to do that, as those variables don't seem to be declared at all. That is why I am going with the 3 formulas - so I can control the scope and usage of the variables.

If you know how to write a formula using the variables created in Running Totals, that would be great. Thanks!




Edited by NedSchneebly - 13 Aug 2009 at 2:52pm
Sigless and Bible Black
IP IP Logged
NedSchneebly
Newbie
Newbie


Joined: 09 Jul 2009
Location: Canada
Online Status: Offline
Posts: 23
Quote NedSchneebly Replybullet Posted: 13 Aug 2009 at 2:51pm

Hmmm - I just changed "Global" in my 3 formulas to "Shared" and it worked!
It was my understanding that you only need "Shared" when you are involving sub-reports, which I am not. Oh well, I'm happy now!

Sigless and Bible Black
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Aug 2009 at 6:12am
Hmmm...I only use shared, just because they have the largest scope.  I too was under the impression that the only difference between Global and Shared was that the Shared could be seen in subreports.
 
Just checked Brian's book, and it concurs, the variable should have been fine. Global is available for the entire report (subreports aren't part of the main report, and so, cannot see a Global variable).
 
Well...we both learned something.
sorry it took so long.
IP IP Logged
<< Prev  Page  of 2
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum