Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1005
How to print multiple charts to same page?
posted

Hi, I have a form that can display up to 4 charts in various layouts, and I want to be able to print the charts in the desired layout on a single page.  Is there a way to do this?

Thanks.

Brian

Parents
No Data
Reply
  • 1005
    posted

    I managed to figure out how to do this myself, although I'm not sure if it's the best way.

    I rooted around the forum and found that you can save the chart to a stream as a bitmap of any size you like using the SaveTo() method.  So I now create a bitmap big enough for all the charts on the form, and get a graphics object for it.  I then save each chart in turn to a memory stream as a bitmap of the size I want on the final page, and then I reload it into a bitmap object, which I then draw to the appropriate part of the main bitmap using the DrawImage() method of the graphics object. Finally I can just print the resulting bitmap. :)

Children