Setting report parameter in reportviewer

Posted by: derek on 20 May 2018, 7:15 pm EST

    • Post Options:
    • Link

    Posted 20 May 2018, 7:15 pm EST

    Hi I am calling a report using the web api and have a reportviewer on a MVC page setting the service URL, reportname and filepath as per your examples.

    The report in question relies upon a parameter in its datasource, but I cannot see how I can either pass this parameter to the web api or whether I need to set this at runtime on the report.

    Any help here as to the correct method would be appreciated.

    @(Html.C1().ReportViewer()

    .ServiceUrl(@“http://localhost:48775/api/report”)

    .FilePath(@“ReportsRoot/myReport.flxr”).ReportName(@“Report1”)

    .CssStyle(“width”, “90%”)

    .ZoomMode(ZoomMode.PageWidth)

    .ThresholdWidth(650)

        )
    
  • Posted 21 May 2018, 5:05 pm EST

    Hi,

    Please refer to the “Setting Parameters in Code” section for following demo sample:

    http://demos.componentone.com/aspnet/reportviewer101

    ~Manish

  • Posted 21 May 2018, 7:16 pm EST

    Great, thanks.

    I missed that one.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels