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

How to make subreports flow

edited August 2014 in General
I have 4 subreports and I have set the "ShiftRelative to" to the
correct flow where one follows the other. Each subreport has a Detail
band that carries a TppDBImage which is set to Stretch and AutoSize.
When I print the report, they are all bunched up together instead of
one page after the other. Where did I go wrong?

Also, I would like to have my TppDBImage centered horizontally on the
page. How do I do that?

Thanks for any help in advance.

Andy

Comments

  • edited August 2014
    Hi Andy,

    Which version of ReportBuilder and Delphi are you using?

    If each subreport is set to ShiftRelativeTo each other, they should not
    overlap and there is no known issue with this functionality. Be sure
    each ShiftRelativeTo property is properly set for each subreport and
    that the parent band is set to PrintHeight := phDynamic.

    Also note that if you are loading templates, you need to set any
    properties related to the loaded report after the template is loaded or
    the original settings will overwrite your new settings.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2014
    Hi Nico,

    Thanks for the response. I am using the latest ReportBuilder with XE5.
    I did set the ShiftRelativeTo correctly but not sure why it is so. I
    have since changed everything around, mainly the dataset and the
    Datapipes.

    Basically, there is a master table with only one record and the detail
    table has several records linked to the master table. I need to print
    a report that has 3 pages of images from the master table, one on each
    page. Once that is done, I need to iterate through the detail to
    create a table with 5 columns. I managed to fulfill most that although
    I had trouble with creating the table. I used a combination of
    rectangles and lines, but they don't come out right usually with the
    lines not connecting to each other or when it overflows to the next
    page. Is there a good example on how to create a table of this sort?

    Also, I am using ADO to access the data but I can't seem to print
    Unicode characters even with XE5 with the TppDBMemo. TppLabel seems to
    work fine though. Is there a special way to save Unicode data in the
    table? I am using Microsoft Access and I made sure that Unicode
    compression is on for the data field, but no joy. I even tried saving
    the data in UTF8 but the printout is always gibberish.

    Thanks Nico for all your help.

    Andy


    On Fri, 22 Aug 2014 08:59:55 -0600, "Nico Cizik (Digital Metaphors)"
  • edited August 2014
    Hi Andy,

    There are numerous ways to make a table design in ReportBuilder. The
    easiest is to use the new TableGrid component. If you place a TableGrid
    on your report, you can simply add report components into each cell as
    you would like. See the help topic for TppTableGrid for more information.

    Other options are using lines and shapes or component borders.
    Generally when using lines, you want to be sure to use the ParentHeight
    and/or ParentWidth properties to ensure they extend the height/width of
    the band.

    For your other issue, ReportBuilder simply retrieves data as-is from
    your dataset by making the Delphi call TField.GetString. A good test
    would be to create a simple app without ReportBuilder and simply place a
    TDBMemo on a form and try to access your data.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2014
    Hi Nico,

    Thanks very much for all the suggestions. I will give it a try.

    Andy

    On Mon, 25 Aug 2014 10:06:13 -0600, "Nico Cizik (Digital Metaphors)"
This discussion has been closed.