cmichailovlee
MIS
I've been using Crystal reports for some time. However, I've only recently run into a situation that requires me to analyze data from different databases that aren't necessarily linked together.
Ideally, I'm trying to link a subreport to the main report using the date. On the main report, I obtain parameters from the user asking for the start date and then the end date. When I link to the subreport using the reference books I have on Crystal 10 and then run the report, the main report comes back with valid data, but the subreport comes back with nothing.
When I look at the sort criteria in the subreport where I usually set the parameters equal to the date field, I get the following formula:
{invoices.purchased_date} in {?from_date} to {?to_date} and
{invoices.purchased_date} = {?Pm-session_viewer.date_visited}
The ?from_date and the ?to_date are parameters that were initially part of the subreport when I had developed it earlier on it's own. However, what concerns me is that after linking in this report as a subreport, it adds that line:
{invoices.purchased_date} = {?Pm-session_viewer.date_visited}
When I take a closer look at this once the report is run, it looks like it's only passing a discrete value rather than a range from the main report. The main report also has a ?from_date and ?to_date parameter that asks the user for information.
So my question is: even if I remove the line:
{invoices.purchased_date} in {?from_date} to {?to_date} and
why this subreport not work? I've tried a number of different ways to get this data. I even tried assigning the parameters from the main report to shared variables, but then I get an error from the subreport saying it can't do that because the formula has to be run later.
Any assistance anyone can provide would be of much help. I've looked at The Complete Reference for Crystal Reports 10 from McGraw Hill and it does a great job of explaining the concept but doesn't go into much more detail than that. I've not found anything of substance out on the Business Objects site, either.
Thanks in advance!
Christopher
Ideally, I'm trying to link a subreport to the main report using the date. On the main report, I obtain parameters from the user asking for the start date and then the end date. When I link to the subreport using the reference books I have on Crystal 10 and then run the report, the main report comes back with valid data, but the subreport comes back with nothing.
When I look at the sort criteria in the subreport where I usually set the parameters equal to the date field, I get the following formula:
{invoices.purchased_date} in {?from_date} to {?to_date} and
{invoices.purchased_date} = {?Pm-session_viewer.date_visited}
The ?from_date and the ?to_date are parameters that were initially part of the subreport when I had developed it earlier on it's own. However, what concerns me is that after linking in this report as a subreport, it adds that line:
{invoices.purchased_date} = {?Pm-session_viewer.date_visited}
When I take a closer look at this once the report is run, it looks like it's only passing a discrete value rather than a range from the main report. The main report also has a ?from_date and ?to_date parameter that asks the user for information.
So my question is: even if I remove the line:
{invoices.purchased_date} in {?from_date} to {?to_date} and
why this subreport not work? I've tried a number of different ways to get this data. I even tried assigning the parameters from the main report to shared variables, but then I get an error from the subreport saying it can't do that because the formula has to be run later.
Any assistance anyone can provide would be of much help. I've looked at The Complete Reference for Crystal Reports 10 from McGraw Hill and it does a great job of explaining the concept but doesn't go into much more detail than that. I've not found anything of substance out on the Business Objects site, either.
Thanks in advance!
Christopher