Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Cannot pass param value to SQL command object in subreport

I am forced to use CR10 due to vendor's application for which I write and customize reports. Converting report to a new vendor version with Oracle 10, but a subreport is choosing a bad query plan when use normal db linking dialog. Found that if I pass a HINT, I can get Oracle to choose a good plan. So created a command object (terminology?) with Add Command. Need to pass it one parameter from main report. I understand how to add a param to SQL command object and have done so. But cannot seem to get a database link from main report to pass value correctly to the SQL command object parameter. Forum makes this clear it can be done in CRXI and CR2008, but have not really found a good explanation of how to set it up.

First, can one do this in CR10? If so, what is the trick to get the subreport link parameter to pass to the command object param? Some posts seem to use single quotes around parameter in SQL command, but is that only for cascading prompts in XI+? Do I create a command parameter and then pass the value via subreport link directly to that subreport command param? Does not seem to work. Seems that the param is passed to SQL as a string with param name in it.

Would welcome some guidance from someone who knows.

Former Member
Not what you were looking for? View more on this topic or Ask a question