Technically a main and subreport don't execute at the same time, and subreports should be avoided, but yes, use the same criteria in each, and you can pass parameters from the main to the sub using the LINK.
You can also go in and manually edit the subreport record selection formula after linking if there's something amiss.
You should post what you're trying top do with an example of the main report record selection though, you question asks for a yes/no response, there's nothing specific.
Edit>Subreport Link, to be exact. Note that it will want to link the parameter to soemthing and will place a selection rule in the subreport's record selection. This can be removed if you don't want it.
I often use a date parameter in both the main report and subreport.
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
The Edit > Subreport Links has worked a treat! Thanks very much.
I have an orders_current and orders_history file, both with exactly the same columns and names. I wanted to be able to pull details of all orders for a particular customer on a certain date from both files. I've used the orders_current in the main report and the orders_history in the subreport. After using Edit > Subreport Links I can set the main report to pass those parameters to the subreport.
I had initially tried to create a Command using "select * from libraryname/orders_current UNION ALL select * from libraryname/orders_history" but this threw up the following error "Failed to retrieve data from database. Details: HY000:[IBM][iSeries Access ODBC Driver][DB2 UDB]SQL5016 - Qualified object name orders_current not valid. [Database Vendor Code: -5016]" Has anyone any idea why or if I'm doing something wrong? The database I'm using is on AS400, software version 5, release 2, mod level 0.
Thanks for your help.
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.