Home Subreports

New Page when Group Changes

edited February 2010 in Subreports
Hi All,

Is there a way to access subreport components in Main Report ?
All I'm trying to achieve is to print my data on new page when Group Changes
based on user input. It's an option that user can select whether the group
has to be printed on new page or not. I have all grouping done on
SubReports. I was able to achieve the same requirement if the grouping is on
Main Report by using AfterOpenDataPipelines. I'm unable to use that on
SubReports as it doesn't have something like that. Using Report Builder
Enterprise Edition v10.03

Any help is appreciated.


Thanks,
Santhosh K
Lindsey Software.

Comments

  • edited February 2010
    Hi Santhosh,


    I'm unsure what you mean by this. Are you using RAP to access your
    subreport properties?

    You can use the Group.NewPage property to force the group to start a new
    page when it changes.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010
    Nico,
    Yes, I'm using RAP. I was talking about setting Sub Report Group Properties
    in the Main Report.
    like if I have a group2 in SubReport, I wanted to do Group2.NewPage in the
    Main Report in the AfterOpenDataPipelines to start new page on each group.
    Is there any event in the SubReport which is similar to
    AfterOpenDataPipelines where I can set Group2.NewPage property ?

    Hope I made it clear. Thanks for the prompt reply.

  • edited February 2010
    Hi Santhosh,

    You could access the groups property of the child report from the main
    report. Something like the following...

    procedure ReportAfterOpenDataPipelines;
    begin
    SubReport1.Report.Groups[0].NewPage := True;
    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010
    Thanks Nico. I'll try that.
  • edited February 2010
    It works good, but it leaves the first page empty and then starts printing
    as it supposed to from second page.

  • edited February 2010
    Hi Santhosh,

    This most likely has something to do with the design of your report. In my
    testing with a simple design (Report with Subreport and group), this worked
    as expected. Try simplifying your design and see if you can find the
    problem.

    Where is the subreport located? Could the information on the main report be
    moving the first subreport to a new page?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010
    SubReport is located in the Summary section. I use the same pipeline for the
    Main Report and SubReports. There is nothing in the Detail section of the
    Main report. All the Main Report does is print the header.

  • edited February 2010
    HI Santhosh,

    Why does the subreport need to be in the summary band? Try moving it to the
    detail.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2010
    I simplified my report. It works good now.

    Thanks Nico.
This discussion has been closed.