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!
thanks
Lorenzo
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!
thanks
Lorenzo
Comments
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?
where am I wrong?
This is the report!
Sorry but I don't understand! I made this try but for me it doesn't work!
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
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
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
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!
Thanks I thought there was such a thing but I could not find it!