Print Empty record of master detail for cross band

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

Print Empty record of master detail for cross band

Post by ymc »

I have used
if (dsBudgetOverRun.Count == 0) Cross_Data4.CountData = 1;
for BeforePrintEvent
and
if (dsBudgetOverRun.Count == 0)
{
Cross_Data4.CountData = 0;
Cross_Data4.DataRelationName = "ProjectSet_BudgetOverRun";
Cross_Data4.DataSourceName = "dsBudgetOverRun";
Cross_Data4.MasterComponent = Cross_Data1;
}

for display the detail with no datacount of the child.

For the normal databand it's work fine but for the cross-band it only display the first data.
I have try to think about to reset data source but I found that it default set to true. So, what is the different setting or any idea about this issue?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Print Empty record of master detail for cross band

Post by Edward »

Please try to use filters inside the Cross_Data4 based on expression.

Also please note, that CountData of the DataBand overrides assignment of the DataSource, because priority of CountData property is higher.

There is a property named "PrintIfDetailEmpty" for the CrossDataBand which hides master when details rows are not exists when the property is set in false.

If this tips is not helpful, please provide me with more information about relationship between Cross_Data1 and Cross_Data4. Which behavior for Cross Data bands you would want to achieve?

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

Print Empty record of master detail for cross band

Post by ymc »

I have sent out the source to support@stimulsoft.com

I think it will make the question more clear.

Thx.
Post Reply