Skip to Content
0
Former Member
Dec 07, 2009 at 09:05 PM

Pass Date Range Subreport Link

125 Views

Hello,

I am trying to pass date parameters from a main rpt to a subreport. I am also passing other parameters (like names) and that seems to be working well. But for whatever reason I can't seem to get the date parameter to pass properly to the subreport, every time I try to include it the subreport is rendered blank (which I know to be incorrect). Is there something special about passing a date parameter (as opposed to other parameters) I need to contend with? Thank you

These are the parameters from the main report and, as I mentioned previously, they work just fine:

{2009CostReductionGrouped_Q.Location}={?Location} AND

{2009CostReductionGrouped_Q.BuyerName} = {?Buyer Name} AND

{2009CostReductionGrouped_Q.CostReductionType} = {?Cost Reduction Type} AND

{2009CostReductionGrouped_Q.ApprovalStatus} = {?Approval Status} AND

{2009CostReductionGrouped_Q.MonthApproved} = {?Date Range}

Now when I pass theses parameters to the subreport as links the syntax changes to this:

{2009CostReductionGrouped_Q.Location} = {?Pm-?Location} AND

{2009CostReductionGrouped_Q.BuyerName} = {?Pm-?Buyer Name} AND

{2009CostReductionGrouped_Q.CostReductionType} = {?Pm-?Cost Reduction Type} AND

{2009CostReductionGrouped_Q.ApprovalStatus} = {?Pm-?Approval Status} AND

{2009CostReductionGrouped_Q.MonthApproved} = {?Pm-?Date Range}

And they all work, expect the date range for the subreport. Every time I include this link within the subreport the subreport renders blank (which is incorrect). So what I did to test this is that I passed all the parameters, expect the date range, to the subreport.

For the subreport date range I just created another date range parameter within the subreport itself and it works just fine, except that this seems silly to me because the user will be presented with two date range fields which could be confusing.

{2009CostReductionGrouped_Q.Location} = {?Pm-?Location} and

{2009CostReductionGrouped_Q.BuyerName} = {?Pm-?Buyer Name} and

{2009CostReductionGrouped_Q.CostReductionType} = {?Pm-?Cost Reduction Type} and

{2009CostReductionGrouped_Q.ApprovalStatus} = {?Pm-?Approval Status} and

{2009CostReductionGrouped_Q.MonthApproved} = {?Subreport Date Range}

I guess I don't understand why one works and the other doesn't.