Page 1 of 1

Header is never shown if data is in subreport

Posted: Tue Dec 02, 2014 9:53 am
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

Re: Header is never shown if data is in subreport

Posted: Wed Dec 03, 2014 8:26 am
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.

Re: Header is never shown if data is in subreport

Posted: Wed Dec 03, 2014 8:34 am
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

Re: Header is never shown if data is in subreport

Posted: Thu Dec 04, 2014 8:33 am
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.

Re: Header is never shown if data is in subreport

Posted: Thu Dec 04, 2014 8:45 am
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

Re: Header is never shown if data is in subreport

Posted: Fri Dec 05, 2014 8:53 am
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.

Re: Header is never shown if data is in subreport

Posted: Fri Dec 05, 2014 12:45 pm
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

Re: Header is never shown if data is in subreport

Posted: Fri Dec 05, 2014 12:47 pm
by HighAley
Hello.

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

Thank you.