C1ReportViewer has not contain Document Property

Posted by: shamyjed on 10 September 2017, 11:40 am EST

  • Posted 10 September 2017, 11:40 am EST

    I write this code but .Net raise error that Document is not a member of C1ReportViewer

      Dim rpt As C1.C1Report.C1Report = C1ReportViewer1.CreateC1Report()

    rpt.Load(strPath, strReportName)

    rpt.DataSource.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=False;" & clsDAL.ConnectionString

    rpt.DataSource.RecordSource = strParameters
    C1ReportViewer1.Document = rpt
  • Replied 10 September 2017, 11:40 am EST

    Hello,

    If you are using C1ReportViewer for ASP.NET Wijmo then I would like to inform you that Document property is no longer available. You should use RegisterDocument method in order to register callback which will be called by C1ReportViewer in order to generate a document. Using this way you don’t need to check if the document was cached or not, the C1ReportViewer control takes care about it.

    We have a sample for dynamic (in-memory) documents, this sample is available after Wijmo controls installation under the following path: http://demo.componentone.com/ASPNET/ControlExplorer/C1ReportViewer/InMemoryDocuments.aspx

    I have escalated the issue(TFS ID:16854) to the concerned team to make necessary changes in the documentation as well.

    Regards
    Ashish
  • Replied 10 September 2017, 11:40 am EST

    please post me sample coding of how to view xml report file generated by componentone report desinger in webpage using RegisterDocument method
  • Replied 10 September 2017, 11:40 am EST

    Hello,

    If you want to view xml report file in C1ReportViewer then you can set the the ReportName, FileName properties to the desired values and it will display the report. Here is the code for same:

    C1ReportViewer1.FileName = "C:UsersstduserDocumentsComponentOne SamplesStudio for WinFormsC1ReportC1ReportXMLCommonTasksBarcodeLabels.xml"

    C1ReportViewer1.ReportName = "Product Labels (EAN-13, Label 5096)"

    Also, you may check sample available at the following link: http://demo.componentone.com/ASPNET/ControlExplorer/C1ReportViewer/ToolbarCustomization.aspx

    Let me know if you have any questions.

    Regards
    Ashish
  • Replied 10 September 2017, 11:40 am EST

    Hello,

    The 'Document' property has been removed under the topic "C1Report generated in memory by user code" in the updated documentation.
    http://helpcentral.componentone.com/nethelp/c1reportviewerwijmo/default.htm?turl=displayingreportsanddocuments.htm

    Thanks for reporting the issue.

    Best Regards,
    Richa
Need extra support?

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

Learn More

Forum Channels