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
95
Printdocument into Report object
posted

I have an Infragistics print document that I would like to be able to convert into a Report so that we can utilize its extra features - pdf, excel, etc.  Does anyone know of the way to do this, here is what I have tried in the printpage event with no success since they are probably differently formatted xml:

  Dim rpt1 As New Report

 Dim st As New System.IO.MemoryStream
        UltraPrintDocument1.SaveAsXml(st)
        st.Position = 0
        rpt1.Load(st)

 

Any help would be greatly appreciated.

Parents
No Data
Reply
  • 37774
    posted

    The Report object uses its own XML structure for storing and loading the various objects in the Documents assembly, so you can't save other objects into XML and have the Report load it.

    There is a thread here regarding using the PrintPage of the document to draw into a graphics object.  I think that you would want to do something similar, except that in the PrintPage you would print to some in-memory Bitmap.  When all of this is accomplished, you could then create a new page in a Section of the Report and add each image that you created in the previous PrintPage.  Unfortunately, since there's no easy conversion, you'd lose the ability to change any of the individual parts of each page without manually recreating it.

    -Matt

Children
No Data