Ticket Q50243
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Web - Capability to print and export a WebChartControl on the client side

Export WebChart

created 17 years ago

Hello,
I have been unable to find a demo/tutorial on how to export a WebChart to PDF or HTML format.
I noticed that ExportToPdf is not a member of the WebChartControl so this is not the way to go.
I would appreciate if you could provide me with some directions,
Thanks in advance,
Michel

Show previous comments (1)

    Thank you for showing me the direction to export a WebChart to PDF.
    After conversion to VB , the code you suggested reads as follows:
    Using ms As New MemoryStream()
                TryCast(DirectCast(Chart_Main, IChartContainer), IChartContainer).Chart.ExportToPDF(ms)
                '…
                ms.Seek(0, System.IO.SeekOrigin.Begin)
            End Using
    I have a "The IChartContainer is not defined" message in my code.
    I have the Imports DevExpress.XtraCharts. Do I need an extra DLL/imports statement to declare the IChartContainer object ?
    Thank you,
    Michel

    DevExpress Support Team 17 years ago

      Hi Michel,
      I'm sorry, I've misinformed you in my previous reply. Unfortunately it's impossible to export a WebChartControl directly into the PDF.
      I suggest that you create a new XtraReport document, and then utilize XRChart control abilities to display a chart similar to the one you've implemented via the WebChartControl. This way, you'll be able to display this newly created report via the ReportViewer on your web page, and then export its content to the PDF file.
      Thanks,
      Andrew

      DevExpress Support Team 17 years ago

        Hello Michel,
        We've already answered a similar question, and I suggest that you refer to Export from WebChartControl.
        Please review this issue, and let us know the results.
        Best regards, Alan.
        R&D, .NET Team.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.