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
270
Report adding extra page
posted

It seems like a default page in which I can't create a handle for.

I create a new Report object as Infragistics.Documents.Report.Report

Then, I create a new Section as an ISectionPage with Report.AddSection.AddPage and then define my page Width and Height.

I can create content and everything to that Section just fine. When I output (Publish) my report I get a full size page added to my newly created section. I can't seem to get a handle on that default page. There are no methods available from the initially created report object to grab that default page. I either want to edit the default page, or remove it after I'm done creating my new one. Is there a Page collection in the Report object that I'm not aware of or Intellisense isn't showing?

Parents
No Data
Reply
  • 12333
    posted

    Hi,

    Once you call an "AddWhatever( )" method to create and add an object to your Report, you cannot remove it.

    The Document Engine is designed in a way that it does not contain any publicly accessible collections. Think of this as a linear type of design where you linearly create, configure and add various objects to your report.

    If you wish to access any of the objects that you add to the Report, you need to store that yourself through your own variables:

    e.g.

    ISomething theSomething = myReport.AddSomething( );

    ....later on in the code...

    theSomething.DoSomething( );

    Coding your report logic in this fashion will allow you to access any of the objects that you add to the report for additional processing.

    -Tom

Children
No Data