chrisssyp82
MIS
Crystal 2008
Hi, i'm trying to create a report which will show premium's for a date period selected by the user, but also show the period selected for last year.
I decided to create a main report with the user selected data, and then i'd create a subreport which would show same period last year, linked by the Account Group. I created two parameters in my main report {?Start Date} and {?End Date} and added them to the select like so: {tblTrans.TransDate} in {?Start Date} to {?End Date}
Then in the sub report i created the same parameter fields and on the sub report change links, added the parameter values from the main report and in the field link unselected "Select data in subreport based on field" and just selected the corresponding parameter. Then in my select in the subreport i entered this: {tblTrans.TransDate} in date(year({?Start Date})-1,month({?Start Date}), day({?Start Date})) to date(year({?End Date})-1, month({?Start Date}), day({?Start Date})).
However when i run this in shows the data from the main report and not the subreport. Have i done something incorrect? Or am i going about this totally the wrong way?
Thanks
Hi, i'm trying to create a report which will show premium's for a date period selected by the user, but also show the period selected for last year.
I decided to create a main report with the user selected data, and then i'd create a subreport which would show same period last year, linked by the Account Group. I created two parameters in my main report {?Start Date} and {?End Date} and added them to the select like so: {tblTrans.TransDate} in {?Start Date} to {?End Date}
Then in the sub report i created the same parameter fields and on the sub report change links, added the parameter values from the main report and in the field link unselected "Select data in subreport based on field" and just selected the corresponding parameter. Then in my select in the subreport i entered this: {tblTrans.TransDate} in date(year({?Start Date})-1,month({?Start Date}), day({?Start Date})) to date(year({?End Date})-1, month({?Start Date}), day({?Start Date})).
However when i run this in shows the data from the main report and not the subreport. Have i done something incorrect? Or am i going about this totally the wrong way?
Thanks