One or more parameters were not specified for the subreport

Hi,

I am getting an error during subreport generation indicating a parameter is not specified. The parameter value is coming from a dataset which is generated based on user selection parameter. I have tried to print the parameter values in the body of the main report and I can see there is a value associated to it but somehow SSRS 2008 R2 is unable to pass it to subreport. I am sure this error is occurring due to parameter value generation using a cascading parameter. I have tried to append a guid to the value for SSRS to rebind it at every refresh. But nothing helps. Is there any solution for this error?

Thanks,

Gayatri

September 9th, 2015 8:15pm

Ok now what I have found is the first time it works fine. If I change the user parameter which in turn should populate the dataset which is passed as parameter to subreport doesn't get populated when the subreport renders. How can I control this behaviour?

Thanks,

Gayatri

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 8:49pm

Hi Gayatri,

This error message hints that either the report parameter has not been passed from the parent report to the child report or that the wrong format of report parameter or an unacceptable value for the report parameter has been passed from the parent to the child report (I mean the subreport when I mean the child report). Can you check the report parameters that are being passed once again?

September 9th, 2015 9:44pm

Hi Milan,

The parameters are all passed correctly. If not then it wouldn't work for any but it does work at times. Currently I have placed my subreport in rectangle and the subreport gives me error. As a workaround I have added table in main report and set its dataset to the dataset which populates the parameter needed for subreport. I have placed the subreport in a table header cell and I have passed the value to subreport parameter directly through dataset. It generates output but the problem I have with this approach is that it picks only the first row. In actual I have five different values coming out of dataset but I want subreport to be generated once with all the five values. I modified the dataset to generate 1 concatenated row but it throws error with table workaround.

Thanks,

Gayatri

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 10:03pm

Hi Gayatri, 

According to your description, the cascading parameter value cannot be passed to sub report, right? 

In Reporting Services, the report parameter will be processed during data retrieval. In you scenario, since you mentioned that only the cascading parameter value and change the user parameter secondly, the value cannot be passed to sub report correctly. You need to check if the cascading parameter has right settings. Please refer to the following steps: 

  1. Double-click the parameter and go to Advanced. 
  2. Check the "Always refresh" is selected. 

If you have any other question, please feel free to ask. 

Regards,
Shrek Li

September 9th, 2015 10:19pm

After some debugging, I have found some weird behaviour and I can't figure out why this is happening. Subreport has parameters and available values are prepopulated using a dataset. The default value is set to blank. I am passing values from main report for parameter. Somehow SSRS is unable to map one of the values passed from main report to available values. In actual the available values match the values passed to subreport. The dataset populated in main report and sub report are both from the same source. Can anyone help what this problem could be?

Thanks,

Gayatri

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 10:32pm

Hi Gayatri,

By your description, itseems that the avialable values which are passing to parameter are not matching with the values from main report right? tr verifying the sql code behind the main report and parameter( query from which the available values are coming) whether restricting any values in dataset..

September 10th, 2015 7:42am

Hi Lucky,

There is no filters attached to the parameter dataset in subreport. I could see the same value available in the parameter list. I am not sure what is wrong when passed the same value from main report.

Thanks,

Gayatri

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 7:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics