Display Empty record of master detail

Stimulsoft Reports.NET discussion
Post Reply
ymc
Posts: 31
Joined: Tue Oct 30, 2007 9:00 pm
Location: Hong Kong

Display Empty record of master detail

Post by ymc »

I have a master detail band called A
and the other databand called B related to the Databand A...However...I have got another databand C and D inside Databand B using container and those were related to B.

--------------------------------------------------------
A
A.data1
-----------------------------------------------
B
B.data1
B.data2
----------
C
C.data1
----------
D
D.data1
----------
B.data3
----------------------------------------------
---------------------------------------------------------

I found that the result if C or D with no data related to master detail B...the C.data1 and D.data1 shrink made B.data 3 shift up.
But if C.data1 and D.data1 have data which related to matser detail B it display correctly.
With no data the display like:

--------------------------------------------------------
A
A.data1
-----------------------------------------------
B
B.data1
B.data2
B.data3
----------------------------------------------
---------------------------------------------------------

So, how can I insert a 0 or something in the C.data1/D.data1 during no related data to B remain the shape of the report and later can use the data for calculate the subtotal on
B.data1 + B.data2 +C.data1 +C.data2 +B.data3?
ymc
Posts: 31
Joined: Tue Oct 30, 2007 9:00 pm
Location: Hong Kong

Display Empty record of master detail

Post by ymc »

did anyone have any idea?
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Display Empty record of master detail

Post by Brendan »

Try setting the PrintIfDetailEmpty property of Databand B to true.
ymc
Posts: 31
Joined: Tue Oct 30, 2007 9:00 pm
Location: Hong Kong

Display Empty record of master detail

Post by ymc »

Brendan wrote:Try setting the PrintIfDetailEmpty property of Databand B to true.
I have tried this before but still cannot display and B.data3 still shifted up
I have also tried set Databand C and D PrintIfDetailEmpty to true but still no effect...

Thx
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Display Empty record of master detail

Post by Brendan »

Is the Can Shrink property set to True for Databand B? This could be causing your B Data to shift up when it has no relating C or D Data.
Try setting Can Shrink to false for Databand B if you want to band to keep it's minimum size.

Is it that you want to reserve the space inside the containers on Band B even when there's no data?
ymc
Posts: 31
Joined: Tue Oct 30, 2007 9:00 pm
Location: Hong Kong

Display Empty record of master detail

Post by ymc »

Brendan wrote:Is the Can Shrink property set to True for Databand B? This could be causing your B Data to shift up when it has no relating C or D Data.
Try setting Can Shrink to false for Databand B if you want to band to keep it's minimum size.

The Can Shrink property was set to false by default

Is it that you want to reserve the space inside the containers on Band B even when there's no data?
Yes, coz even though there is no data in C and D I would like to reserve the space during display. Moreover, I would like to see if there any way to set the value such as 0 insert into it for further calculation.
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Display Empty record of master detail

Post by Guest »

You can use the RenderingEvent event of this bands(D and C), where write the following:

Code: Select all

if (DataSourceName.Count == 0) DataBandName.CountData = 1
whereupon your databands should be shown in any case.

Thank you.
ymc
Posts: 31
Joined: Tue Oct 30, 2007 9:00 pm
Location: Hong Kong

Display Empty record of master detail

Post by ymc »

Pavel wrote:You can use the RenderingEvent event of this bands(D and C), where write the following:

Code: Select all

if (DataSourceName.Count == 0) DataBandName.CountData = 1
whereupon your databands should be shown in any case.

Thank you.
I have added it at the renderingevent but still the same...I have email the report to
support@stimulsoft.com

Please help me to have a look.
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Display Empty record of master detail

Post by Guest »

Try to set the "Reset Data Source" property of the databands from the container, to True

Thank you.
Post Reply