Can I hide data if not available and have its placeholder shrink?

Stimulsoft Reports.NET discussion
Post Reply
jonmoores
Posts: 4
Joined: Fri Oct 06, 2006 11:30 am
Location: NL

Can I hide data if not available and have its placeholder shrink?

Post by jonmoores »

Hi,

I am trying to create an totals summary on an invoice and have the following fields:


Amount@VAT low 10.00
Amount@VAT high 99.00
VAT low total 0.50
VAT high total 17.00
Subtotal 109.00
Total 126.50

What can happen is that the low and high parts are optional (i.e. we can have an invoice only with items of low or only high) in which case I do not want to show the fields and the rest should pull up accordingly.

So in the above if there was 0.00 for Amount@VAT high it should look like:

Amount@VAT low 10.00
VAT low total 0.50
Subtotal 10.00
Total 10.50

Is this possible?

Thanks
Jon
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Can I hide data if not available and have its placeholder shrink?

Post by Vital »

For example we have variable ShowHigh in report dictionary and following component for header, data and footer:
HighTextHeader, HighTextData, HighTextFooter. We can use BeginRenderEvent of page where this component is placed:

Code: Select all

HighTextHeader.Enabled = ShowHigh;
HighTextData.Enabled = ShowHigh;
HighTextFooter.Enabled = ShowHigh;
After then we need correct position and width of other component. For example:

Code: Select all

LowTextHeader.Left = 10;//You need use unit of report
LowTextHeader.Width = 30;
In other way you can use property Dock of each component. Set this property of all components placed on band to Left.
For last(or first) component on band set this property to Fill. In this case all components on band will be adjust it positions and widths
automatically.

Thank you.
Post Reply