Is it possible to use a string formula from the main report as a command object parameter in the subreport? I'm trying to construct dynamic sql in my subreport using CRXI.
I don't think that you can use any extrenals other than a parameter in a command object, and i think that you can ONLY use parameters as created within the command object itself.
I can see how this could allow for some very flexible coding though, and creating dynamic SQL.
In general subreports should be avoided due to decreased performance, perhaps you should post particulars about your Crystal version, the database used, example data and the expected output and get some other ideas of how to approach the requirements.
Thanks for your immediate reply k. I'm using crystal XI with sp2 against a postgres database.
Since crystal won't let me use dynamic parameters in command objects I decided to generate these in a main report and pass them on to a subreport to see if it works. Amazingly it does.
On my main report I have few command objects used to generate few dynamic parameters. When I passed these params on to my subreport they became Pm-?MyParams in the subreport. Then i created params with the exact same name in the subreport's command object and it worked fine - only with discrete values though. Multiple values didn't work.
Then I generated a formula in the main report which creates a string like "and Product.ID in (1000,2000,3000...)" - the values in the brackets represent the parameter selection. Now when I pass the formula on to the subreport it becomes Pm-@MyFormula and the subreport is not displayed at all - even before putting it in the command object.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.