I'm trying to pass a runtime parameter from a main report to a database command parameter in a sub-report, and having some trouble.
My main report has parameter fields (Vendor, Manufacturer, etc) that the user selects at runtime - the result set includes Item Code - that part is working fine. Where I'm having trouble is with linking to the sub-report. My sub-report has a stored command that takes a parameter (ItemCode) and counts the number of times it's shown up on an invoice. When I created the command, it asked for a value for the parameter, and won't accept a blank entry. Now, whenever I try to run the main report, it asks for the ItemCode parameter for the sub-report - which kind of defeats the purpose. I've tried linking from ?Pm-OITM.ItemCode in the main report, but the Subreport Links window doesn't show the Command parameter to link to.
How do I take a field from the main report and pass it to a sub-report to be used as a parameter in a stored database command?
I'm running CR 2008, and SAP B1 2007 PL 42 on MS SQL 2005, and I'm still pretty new at CR, so details help.
Thanks.