Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

subreport print first subreport2 after that print subreport1

edited October 2012 in General
?Dear Nico,

Thank you for your help, I using Child Style subreports.
I could not use ShiftRelativeTo property for I can print first
subreport2 after that subreport1.
What codes I most will add to below which I can change print order?
/////////////////////////////////////////////////////////////////////
ppReport1.Template.FileName :=+ 'Report2Sides.rtm';
ppReport1.Template.LoadFromFile;
ppReport1.DeviceType := dtScreen;
ppReport1.Print;
/////////////////////////////////////////////////////////////////////

Regards
Ali Abbasi


Re: With 2 subreport print first subreport2 after that print subreport1
Nico Cizik (Digital Metaphors) [02 Oct, 15:39]
Msg has 0 replies - Go to base msg by ali_abbasi
Add Nico Cizik (Digital Metaphors) to favorite authors (login)
Hi Ali,

Altering the print order of subreports can be done in multiple ways
depending on the type of subreports you are using.

If you are using Child Style subreports, you can alter the print order
using the ShiftRelativeTo property.

If you are using any other style, you simply use the z-order (Send To
Back, Bring to Front).

Comments

  • edited October 2012
    Hi Ali,

    Please do not post a new thread when replying to another. This makes it
    very confusing keeping track of each question.

    The ShiftRelativeTo property is the only method to control the print
    order of Child style subreports. If you are loading templates, you will
    need to set this property after the template has been loaded (or do so
    in RAP).

    If you must use Delphi code, you will first need to obtain a reference
    to each subreport before setting the ShiftRelativeTo property by using a
    report object loop. The easiest solution would be to alter and re-save
    the report template to meet these requirements.

    http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.