Header is never shown if data is in subreport

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

Header is never shown if data is in subreport

Post by tpontow »

Hello Stimulsoft,

i have a problem with data in subreport. for detail also see my sample project in attachement below.

I have a report with only a databand with corresponding header band. The header should only be shown if there is data in source for databand.

Code: Select all

(ShowIfEmpty == false)
This works as expected.

But after placing my databand into a subreport page the header is not shown anymore. It doesn't matter if the subreport contains data or not.

What can i do that the header reacts on a databand even it is places into a subreport?

Thanks and regards
Thorsten Pontow
Attachments
StimulsoftSubreportHeaderProblem.zip
VisualStudio sample project
(21 KiB) Downloaded 195 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)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Header is never shown if data is in subreport

Post by HighAley »

Hello.

Please, set the Count Data of the Data band to 1.
If there is no data, there is no header.

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

Re: Header is never shown if data is in subreport

Post by tpontow »

Hello Aleksey,

so i have to find out myself if there is data in the subreport and then set Count Data to 1 of the databand where the subreport is placed in?

Thank you
Thorsten Pontow
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: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Header is never shown if data is in subreport

Post by HighAley »

Hello.

If you don't need to show header band always than yes. Or you can use Conditions of the Data Band to disable it.

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

Re: Header is never shown if data is in subreport

Post by tpontow »

Hello Aleksey,

can you give me some advice how a databand condition should look like so that it expresses that an inner subreport has any data?

Thanks
Thorsten Pontow
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: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Header is never shown if data is in subreport

Post by HighAley »

Hello, Thorsten.
tpontow wrote:can you give me some advice how a databand condition should look like so that it expresses that an inner subreport has any data?
You can use DataSource1.Count or something else. It depends on your report.

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

Re: Header is never shown if data is in subreport

Post by tpontow »

Hello Aleksey,

Problem is solved. I check if there is data in the subreport and set

Code: Select all

databand.CountData = 1;
for the DataBand which contains the subreport.

Regards
Thorsten Pontow
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: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Header is never shown if data is in subreport

Post by HighAley »

Hello.

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

Thank you.
Post Reply