0
votes

I have a SSRS dashboard with a main-report and 2 sub-reports. I have 6 parameters to select from.. One of the parameter is 'Division'.

The main report works fine except for only one of the 'Division ID', but when you hard-code that 'Division ID', it works perfect. Besides, If I ran that 'Division ID' from the 'Main Report' it throws 'Error: Subreport could not be shown.'

Did anyone of you solve the similar issue? I appreciate all your help!

2

2 Answers

0
votes

Okay, there are two things I can think of to check:

Parameter Name

In your first paragraph, the parameter name is 'Division'; in the remaining paragraphs, it is 'Division ID'. Is the name consistent wherever the parameter is used?

Subreport Parameter Reference

Right-click your subreport and choose "Subreport Properties", then "Parameters" (if editing the report in BIDS). Click the "fx" symbol next to the Division ID parameter and make sure it's being referenced as expected. For example, this is from a subreport referencing a field value on the main report:

=Fields!DivisionId.Value

Hopefully one of these will help!

0
votes

I found the fix, for some reason SSRS considers that particular 'Division ID' as 'Integer' even after having it set to 'Varchar'. So I had to use the below SSRS expression to convert Integer to String and it worked perfect!

=IIF(CStr(Fields!DataField.Value),CStr(Fields!DataField.Value),"##")