Change the size of Masterdata Band

I tried in every way but I can not change the vertical size of an object Masterdata Band, I need to shrink it.
In my project I have a main page with a mastedataband, inside this there are various subreport that contains another object masterdata band (which prints a single record).
I Using this scheme because it's easier to make invisible a subreport when there is no data for that group, otherwise I should make invisible all the fields used by the subreport!
The problem is that these subreport contain two or three lines of memoview and sometimes I have to make one or two lines of memoview invisible (not all) but I would like that the space occupied by them was recovered by restricting the size of the subreport.
On the forum I found some topic that said to use the property of Stretchmode memoview, but seems I didn't understand how to use it!?

See the image to have idea of the report structure!

report_1.jpg

thanks
Lorenzo

Comments

  • gpigpi
    edited 4:34PM
    Use separate stretched child band for each subreport. Set subreport.PrintOnParent to True
  • edited April 2013
    gpi wrote: »
    Use separate stretched child band for each subreport. Set subreport.PrintOnParent to True

    Thanks
    I set every band owned by the subreports with Streched=TRUE and every subreport PrintOnparent=True!

    This is the result!
    The subreports are overlapped!

    In the mainpage the subreport heigth is smaller that the real band height, but I suppose that the subreport height have to grow during the report calculation?

    report_2.jpg

    where am I wrong?
  • gpigpi
    edited 4:34PM
    Attach your report template
  • edited April 2013
    gpi wrote: »
    Attach your report template

    This is the report!

  • gpigpi
    edited 4:34PM
    Use separate stretched child band for each subreport
  • edited April 2013
    gpi wrote: »
    Use separate stretched child band for each subreport

    Sorry but I don't understand! I made this try but for me it doesn't work!
  • edited 4:34PM
    Hi.

    If I understand you correct, each subreport prints only one record, and the data source is the same as the main masterdata?
    And the reason why you use subreports is that you want to hide them conditionally?

    I so, I would consider not to use subreports at all. Instead I would attach a number of of childbands to each other, starting from the masterdata.
    In each child you put what is now inside each subreport. Be sure to set 'PrintChildIfInvisible' = true for each of them (false by default).

    Then, in the MasterData OnBeforePrint you can put code to modify each child's .visible and .height.

    Petter
  • edited April 2013
    Petter S. wrote: »
    Hi.

    If I understand you correct, each subreport prints only one record, and the data source is the same as the main masterdata?
    And the reason why you use subreports is that you want to hide them conditionally?

    I so, I would consider not to use subreports at all. Instead I would attach a number of of childbands to each other, starting from the masterdata.
    In each child you put what is now inside each subreport. Be sure to set 'PrintChildIfInvisible' = true for each of them (false by default).

    Then, in the MasterData OnBeforePrint you can put code to modify each child's .visible and .height.

    Petter

    Thanks Petter, I think you have actually figured out what I should do.
    I will try to accomplish what you suggested to do so to see if the thing actually works!

    rregards
    Lorenzo
  • edited April 2013
    Petter I tried to follow your advice, and apart from the issues related to scaling, making your own way triggers a problem with the space on the page of the report.
    In fact, my subreports when become child band occupy more space than is available on the page, I tried to insert three groups on a new second page (putting the first group as master data), but in doing this these three groups are printing only for the last record in the database!?


    regards
    Lorenzo
  • edited April 2013
    Hi

    I have not seen any problems with the page space with this method i my projects.

    Attached you will find a sample report with 3 childbands, where all of them have their visibility and height set by random, leaving no extra space.

    (There is no data source, so the master data band is set to print 20 times.)

    Petter
  • gpigpi
    edited 4:34PM
    wrote:
    Sorry but I don't understand! I made this try but for me it doesn't work!
    See attach
  • edited 4:34PM
    Petter S. wrote: »
    Hi

    I have not seen any problems with the page space with this method i my projects.

    Attached you will find a sample report with 3 childbands, where all of them have their visibility and height set by random, leaving no extra space.

    (There is no data source, so the master data band is set to print 20 times.)

    Petter

    Petter S. wrote: »
    Petter S. wrote: »
    Sorry but I don't understand! I made this try but for me it doesn't work!
    See attach

    Thank you both for support!
    Petter I didn't understand well your idea, I made something like the Gpi test example, in this way the space of the page it isn't enough for all my child bands!
    I will try to test this solution!
    thanks!
  • gpigpi
    edited 4:34PM
    wrote:
    I made something like the Gpi test example, in this way the space of the page it isn't enough for all my child bands!
    Set Page1.LargeDesignHeight to True
  • edited 4:34PM
    gpi wrote: »
    gpi wrote: »
    I made something like the Gpi test example, in this way the space of the page it isn't enough for all my child bands!
    Set Page1.LargeDesignHeight to True

    Thanks I thought there was such a thing but I could not find it!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.