Hello,
This is what I am trying to do.
I want a global variable to hold the count of records (i.e. count of records where SegmentGroup = 2) SegmentGroup is just an integer field in my stored procedure. (i don't want to use a subselet or anything like that in my stored procedure, i want crystal formula to give me the count)
So what i want is this count to be totalled up and populated so that i can conditionally supress a section or sections based off the value of the count (i.e. count > 5 or whatever)
In theory i want the count populated before the report is printing so i thought while reading records would do that and I could put formula anywhere on the report and see the same total in any section of the report.
I could get it to give me total in report header if I Insert Summary MAX of formulaD, but what i really want is a global variable populated with a count of records that have SegmentGroup = 2 and be able to refer to that Global variable anywhere in the report and have it be the same value no matter what section of report i am using or refering to it in.
I think i am missing something conceptually, I am newer to Crystal Reports - I am vb programmer. Any help would be appreciated!
My formulas are ver similar to this excerpt from help...
Rem Formula C
Global x as Number
x = 10
formula = x
Rem Formula D
'call the function WhileReadingRecords
WhileReadingRecords
Global x as Number
x = x + 1
formula = x
This is what I am trying to do.
I want a global variable to hold the count of records (i.e. count of records where SegmentGroup = 2) SegmentGroup is just an integer field in my stored procedure. (i don't want to use a subselet or anything like that in my stored procedure, i want crystal formula to give me the count)
So what i want is this count to be totalled up and populated so that i can conditionally supress a section or sections based off the value of the count (i.e. count > 5 or whatever)
In theory i want the count populated before the report is printing so i thought while reading records would do that and I could put formula anywhere on the report and see the same total in any section of the report.
I could get it to give me total in report header if I Insert Summary MAX of formulaD, but what i really want is a global variable populated with a count of records that have SegmentGroup = 2 and be able to refer to that Global variable anywhere in the report and have it be the same value no matter what section of report i am using or refering to it in.
I think i am missing something conceptually, I am newer to Crystal Reports - I am vb programmer. Any help would be appreciated!
My formulas are ver similar to this excerpt from help...
Rem Formula C
Global x as Number
x = 10
formula = x
Rem Formula D
'call the function WhileReadingRecords
WhileReadingRecords
Global x as Number
x = x + 1
formula = x