Perform while/if loop based on 2 month parms to sum certain columns.
I need Crystal syntax for a formula(s) to do a psudeo Perform while/if loop based on 2 month parms to sum certain columns..................
I have 2 run parameters for the beginning month number and another for the ending month number.
I then pass these 2 values to a subreport.
The subreport then needs to sum columns that are named number01.........number12 based on the values of the beginning and ending month numbers.
The challenge is how to write the formula so that I don't have every known mathematical combination of 01 thru 12, 02 thru 12, 06 thru 07, etc.... and somehow spin through the parm ranges related to the columns suffix name.
Is there some type of while and IF logic that I could use and how would I have a variable on the column name?
While
If number(##) in range of beginning month number and ending month number sum each qualifying column;
(where ## = the column's 2 character suffix)
Do I have to build other formula's to represent each column as some variable?
Your help is much appreciated. Thank you.
I need Crystal syntax for a formula(s) to do a psudeo Perform while/if loop based on 2 month parms to sum certain columns..................
I have 2 run parameters for the beginning month number and another for the ending month number.
I then pass these 2 values to a subreport.
The subreport then needs to sum columns that are named number01.........number12 based on the values of the beginning and ending month numbers.
The challenge is how to write the formula so that I don't have every known mathematical combination of 01 thru 12, 02 thru 12, 06 thru 07, etc.... and somehow spin through the parm ranges related to the columns suffix name.
Is there some type of while and IF logic that I could use and how would I have a variable on the column name?
While
If number(##) in range of beginning month number and ending month number sum each qualifying column;
(where ## = the column's 2 character suffix)
Do I have to build other formula's to represent each column as some variable?
Your help is much appreciated. Thank you.