Report parameters are not updated in Report Viewer

Originally Posted 7 July 2014, 2:41 am EST

  • Originally Posted 7 July 2014, 2:41 am EST

    When i try to generate a report using xml file report is genrated with my parameters succesfully.After if again i change my parameters and i try to load my report it shows previous report only .report parametrs are not updated and report data also not updated
    below is my code what i use in my project
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim C1Report1 As New C1.C1Report.C1Report
    C1ReportViewer.RegisterDocument(rptname, AddressOf MakeDoc)
    C1ReportViewer1.FileName = rptname
    C1ReportViewer1.ReportName = rptname
    End Sub

    Protected Function MakeDoc() As C1PrintDocument
    C1Report1 = C1ReportViewer.CreateC1Report()
    Dim path As String = HttpContext.Current.Server.MapPath("~/Reports/Reports/" + rptname + ".xml")
    C1Report1.Load(path, rptname)
    SetParameters(C1Report1)
    Dim DT As DataTable = ReportData.Tables(0)
    C1Report1.DataSource.Recordset = DT
    'C1Report1.Render()
    Return C1Report1.C1Document
    End Function

    here when i try to load my report first time MakeDoc function is calling and report is rendering.but when i try to reload my report with new parametes its not loading.even i use SetParameters(C1Report1) in Page_load but no change in my report.Here i used Rad Window to show the Report is there any problem with rad window to update this report.
  • Reply

    C1ReportViewer1.ReportName = rptname

    If i change my Report name then The report is working fine.how to clear previous report name.if i change that report name report is loading successfully.
  • Reply

    Hello,

    Please refer to our blog which explains changing of recordsource at runtime :
    http://our.componentone.com/2011/12/22/change-recordsource-of-wijmo-reportviewer/

    If the issue persists, then this might be an issue with RadWindow as well. Please let me know whether the issue is observed with C1Dialog control.

    If it does, please send me your sample application.

    Thanks,
    Richa

Need extra support?

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

Learn More

Forum Channels