WIJMO c1ReportViewer.Document

Posted by: baurez on 10 September 2017, 11:41 am EST

  • Posted 10 September 2017, 11:41 am EST


    I would like to generate my Report (c1report) on code behind with some specificity and link this report with a c1reoprtviewer.

    I search some informations to do that, and I found two options:

    - using c1reportviewer.registerdocument et in the makedodelegate function, generate my report and send them via a c1printdocument
    - using the property .document of my c1reportviewer to attach my report

    the first one works, but the makeDocdelegate is only called where the c1reportviewer is loaded.
    and the second doesn't work, the property .document don't exist (is it normal ?)

    maybe someone have a better solution ? :)

  • Replied 10 September 2017, 11:41 am EST


    I would like to inform you that Document property is no longer available in C1ReportViewer for ASP.NET Wijmo . 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 available at the following path: http://demo.componentone.com/ASPNET/ControlExplorer/C1ReportViewer/InMemoryDocuments.aspx

  • Replied 10 September 2017, 11:41 am EST

    Thanks for your response.

    It's what I try, and it work.

    But I have decided to do like this:

    - generate my report
    - link this report to a c1printdocument
    - save the c1printdocument to the harddrive in format c1dx
    - in the reportviewer, set the filename with the c1dx path.

    It works.

    I have another question...

    The c1reportviewer show my report. I can save it into a PDF file (via the toolbar), but the filename isn't readable... so I would like to change this filename, did they exist an easy way to do that ?

    Thanks in advance.

  • Replied 10 September 2017, 11:41 am EST

    Hello Aurélien,

    Sorry for the delay in response.
    I would like to inform you that currently, there is no property/method to change the name of the PDF file when generated via toolbar. I have made an enhancement request for the same to the developer, however, I cannot commit as to when it’d be taken into consideration.

  • Replied 10 September 2017, 11:41 am EST

    Hello Aurélien,

    In wijmo latest build 3.5/4.0.20123.93, the developer have added a new "ExportedFileName" property (property: exportedFileName Name for the exported file)
    for all exported files generated from toolbar in C1ReportViewer.
    You can use like the following code :
     protected void Page_Load(object sender, EventArgs e)
    C1ReportViewer1.ExportedFileName = "PDF File";

    The Wijmo latest build 3.5/4.0.20123.93 is available at :

    Could you please download it and check it at your end. Hope it resolves your problem .

Need extra support?

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

Learn More

Forum Channels