Hi JoLee,
This is a known issue in SQL Server 2008 R2 Reporting Services and SSRS 2012, and has not been fixed yet.
The problem occurs because the subreport has two parameters and the main report only provides a value for the first parameter. The second parameter has a default value. During the initial report execution, Processing triggers report parameter
processing on the subreport. This fills in the value of the second subreport parameter from its default value. Interactive sort causes the report processing engine to reprocess the report according to the new sort order. During the reprocessing,
we do not invoke report parameter processing on the subreport. This leaves the second subreport parameter without a value, causing the subreport to fail.
Here, there are several workarounds for your reference:
- Specify a value for all subreport parameters rather than relying on the default values in the subreport. This will allow Processing to match the subreport instances during the interactive sort step without relying on report parameter processing to fill
in default values.
- If the customer is using a report parameter with a default value simply as a way to reuse a calculation, they should consider using a Report Variable instead (http://technet.microsoft.com/en-us/library/bb934256.aspx).
This will allow them to name a reusable calculation without having to rely on default values in report parameters.
- If the customer is using the defaulted parameter somewhere where Report Variables are not allowed (i.e DataSet.CommandText) they may also consider using a custom code function in the Reports Code block (http://msdn.microsoft.com/en-us/library/ms155798.aspx).
They can then refer to the calculation using something like =Code.GetFirstLetter(Parameters!pTestParam2.Value).
Regards,
Mike Yin
If you have any feedback on our support, please click
here