Empty row in DataBand if no detail data available

Stimulsoft Ultimate discussion
Post Reply
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Empty row in DataBand if no detail data available

Post by tpontow »

Hello,

i have a question regarding to a data band with empty detail data. I'd like to show a single row with empty text fields if there is no data for the data band. I set "Print if Detail Empty" property to True but nothing is shown.

Can you help me with that?

Thanks
Thorsten Pontow
Attachments
ReportDetailIfEmpty.png
ReportDetailIfEmpty.png (124.92 KiB) Viewed 6594 times
ReportNoDetailData.png
ReportNoDetailData.png (23.44 KiB) Viewed 6594 times
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Empty row in DataBand if no detail data available

Post by Alex K. »

Hello,

Can you please send us a sample report with test data which reproduces the issue for analysis.

Thank you.
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Empty row in DataBand if no detail data available

Post by tpontow »

Hello Aleksey,

i don't understand why you need a sample for a report with an empty data source? But ok, here is one:

I altered one of your Stimulsoft C# BusinessObject report sample projects. Start the project via VisualStudio and then click to preview the IEnumerable report.

The data source is an empty collection. The header property "Print if Empty" and the DataBand property "Print if detail empty" are both set to true. The header is shown but not the DataBand.

The used report file is BusinessObjects_IEnumerable2.mrt.

How can i manage to see one empty row with the designed text controls if the data for the report is empty?

To see the report with some data remove the comments from file BusinessObjects_IEnumerable.cs lines 151 - 187. Then also remove or comment the lines with

Code: Select all

emp.Phones.Add(...)
Thanks
Thorsten Pontow
Attachments
BusinessObjects.zip
(109.39 KiB) Downloaded 366 times
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Empty row in DataBand if no detail data available

Post by tpontow »

By the way: it is no solution to add one empty data record to the data source because my real report data comes from a database via our project framework. And so i cannot add one dummy data record.
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Empty row in DataBand if no detail data available

Post by HighAley »

Hello.

The Print if Detail Empty property of the Band works in Master-Detail report in the Master Band and when it is set to True the Master Band will be printed if the Detail Band is empty.
So in your report this property is useless.

We can provide you to use Footer Band with Condition. Please, look at the attached report template.
BusinessObjects_IEnumerable2.mrt
(17.82 KiB) Downloaded 1033 times
Thank you.
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: Empty row in DataBand if no detail data available

Post by tpontow »

Hello Aleksey,

thanks for your quick response and the solution. A Footer Band with Condition is a nice way to solve the problem for me.

Thanks
Thorsten
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Empty row in DataBand if no detail data available

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply