We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
If you became a customer of the Syncfusion Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion for your reporting needs.

Internal Report Parameters Dotnet core

Hello,
I have successfully integrated Report Dedesigner and Report Viewer in Asp.net Core. I am testing a very simple report and all works well without parameters. With parameters when the visibility is set to true it works and I can select the parameter value form, a combobox at runtime. My problem is that I want to supply the parameter dynamically when someone clicks a link for example, i tried "hidden" parameter but I get an error "Hidden report parameters ProcessId is missing a value. Report cannot be rendered"
my parameter is called "ProcessId" it is properly defined in the RDL like so:

 
   
      Integer
     
      true
   

 


my view is defined as so:



and finally in my WebAPI i have the following code:

   public void OnReportLoaded(ReportViewerOptions reportOption)
        {
            var parameters = new List();
            if (DefaultParam != null)
            {
                parameters = JsonConvert.DeserializeObject>(DefaultParam);
            }

            if (parameters != null && parameters.Count > 0)
            {
                reportOption.ReportModel.DataSources.Clear();
                reportOption.ReportModel.DataSources.Add(new Syncfusion.Reporting.Web.ReportDataSource { Name = "ProcessId", Value = 91 });
             
            }
        }

where I harcoded the ProcessId to 91 for testing purposes, I will likely use a session variable in real life. Despite this I still get the error message  above about hidden report parameter missing,  Please what am I missing? I repeat report without parameters is ok and with visible parameters ius also ok.

Thanks in advance for your usual prompt response.






4 Replies

YY Yoab Youssoufou August 11, 2019 06:06 PM UTC

The code did not render well in my text above so I have attached screenshots of my view, RDL file and WebApi.
Thanks

Attachment: ReportParamError_f2af2fa.7z


VS Vinoth Srinivasan Syncfusion Team August 12, 2019 06:09 AM UTC

Hi Yoab, 

We have validated your code snippet and suspect that you are not passing value for the hidden parameter from code behind properly. We suggest you to refer the below help documentation for passing parameters from code behind. 


If you still have any issue then please share your RDL file with us, it will be helpful for us in further validation. 

Regards, 
Vinoth S. 



YY Yoab Youssoufou August 12, 2019 09:03 AM UTC

Thanks. It's ok now.


VS Vinoth Srinivasan Syncfusion Team August 12, 2019 10:49 AM UTC

Hi Yoab, 

Thanks for your update. Please let us know if you require further assistance on this. 

Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon