Page 1 of 1
Use Panel Height in Events
Posted: Wed Jul 13, 2016 8:35 am
by MatthiasU
Hello,
I have a small problem and hope, you can help me
I have a report template with a panel on the left, and a chart on the right side of the page. The panel can grow depending on data. Now, I want to adjust the chart height to the printed height of the panel.
How can I achieve this?
And there seems to be a bug? The panel always grow to whole page height, when property "CanGrow" is set

Please see attached sample template.
Many thanks & Regards,
Matthias
Re: Use Panel Height in Events
Posted: Wed Jul 13, 2016 10:21 am
by Alex K.
Hello,
Please try to use the additional band component on which place Panel and Chart and set the GrowToHeght property for Chart to true.
Thank you.
Re: Use Panel Height in Events
Posted: Wed Jul 13, 2016 11:19 am
by MatthiasU
Hello,
thanks, works fine for the amount of data in my sample, but please try again with 50 data records

Now, I get 3 empty pages and a part of the data on the last page
Thanks & Regards,
Matthias
Re: Use Panel Height in Events
Posted: Wed Jul 13, 2016 1:24 pm
by Alex K.
Hello,
In this case, you can make the following modifications:
- set the MaxSize for the Chart
- or set UnlimitedHeight=true and UnlimitedBreakable=false for the Page
Thank you.
Re: Use Panel Height in Events
Posted: Wed Jul 13, 2016 2:23 pm
by MatthiasU
Hello,
thank you for the reply.
set the MaxSize for the Chart
My sample was simplified. In real case, we don't know the possible max size for the chart, because of additional (header/footer) bands before/after panel/chart which can grow & shrink

So, I have to check if this solution may work for us (I don't think so).
But there is a further issue with this solution: The data bands are splitted between two pages. I have set KeepDetails=KeepDetailsTogether and CanBreak=false and combinations of them, but no impact on ouput
set UnlimitedHeight=true and UnlimitedBreakable=false for the Page
With these options, the chart will be printed over all pages. Sorry, I have forgot to set the PrintOn property for the chart to "OnlyFirstPage", which is required

And all pages are printed on one large page? Can I get three separate pages?
Re: Use Panel Height in Events
Posted: Wed Jul 13, 2016 7:50 pm
by Alex K.
Hello,
Sorry, maybe we did not exactly understand your task. Could you explain your task in more details?
Can you please send us a sample how it should look like.
Thank you.
Re: Use Panel Height in Events
Posted: Thu Jul 14, 2016 11:18 am
by MatthiasU
Hello,
pleasse see attachement for expected output.
Thanks & Regards,
Matthias
Re: Use Panel Height in Events
Posted: Fri Jul 15, 2016 2:53 pm
by Alex K.
Hello,
In this case, you can use the additional code, in which calculate height of the Header info and then in the ProcessChart event set the height for the Chart.
Thank you.
Re: Use Panel Height in Events
Posted: Tue Jul 19, 2016 7:19 am
by MatthiasU
Hello,
thanks for your reply.
But your proposed solution does not fit the described requirements in all points
With your solution, the chart always fills the rest of the page. My target was to set the height of the chart to the height of the panel. I've tried to implement a similar solution with additional code, but I can't get the final height of the panel
Do you have any solution for this problem?
Many thanks & Regards,
Matthias
Re: Use Panel Height in Events
Posted: Wed Jul 20, 2016 6:34 am
by Alex K.
Dear Matthias,
In this case, you can add the additional variable for the calculating height of data section and check the PageCount or make other necessary checks in your working report.
Please check the modified report in the attachment.
Thank you.