Paul12345671
Technical User
Hello,
I have a report that I'm generating to run in JRC. We have an early version of JRC that crashes if I use SQL expressions, so I'm limited to using formulas.
We operate in a state that is broken down into fixed regions. I would like the user to enter a parameter indicating which region the report should be run against. The entire state is selectable as one of the 'regions', in which case the report should be run against all regions.
I have used the following formula (called stateTest), which works fine if a user selects a region, but does not work if the user selects a state (i.e. the report returns no data).
if ({?regionCd}) = 12 then
formula = "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]"
else
formula = "[" & {?regionCd} & "]"
end if
In the selection formula, I have:
... and cstr({SALES.REGIONCD}) like {@stateTest}
Is there any suggestion on how to select all regions if the report receives the 'state' parameter?
I have CR XI, running in windows XP, which I then call from a Java application (under Windows Server 2003).
Thank you,
Paul.
I have a report that I'm generating to run in JRC. We have an early version of JRC that crashes if I use SQL expressions, so I'm limited to using formulas.
We operate in a state that is broken down into fixed regions. I would like the user to enter a parameter indicating which region the report should be run against. The entire state is selectable as one of the 'regions', in which case the report should be run against all regions.
I have used the following formula (called stateTest), which works fine if a user selects a region, but does not work if the user selects a state (i.e. the report returns no data).
if ({?regionCd}) = 12 then
formula = "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]"
else
formula = "[" & {?regionCd} & "]"
end if
In the selection formula, I have:
... and cstr({SALES.REGIONCD}) like {@stateTest}
Is there any suggestion on how to select all regions if the report receives the 'state' parameter?
I have CR XI, running in windows XP, which I then call from a Java application (under Windows Server 2003).
Thank you,
Paul.