problem with printing header

Stimulsoft Reports.NET discussion
Post Reply
dikan
Posts: 202
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

problem with printing header

Post by dikan »

Report looks like this:

HeaderBand1

GroupHeaderband1,Condition:{BROMR.RADID}
DataBand1, Data Source:BROMR
GroupFooterBand1

GroupHeaderband2,Condition:{BROML.RADID}
DataBand2, Data Source:BROML
GroupFooterBand2

FooterBand1

RADID i get from lookup box,data in tables from sql, and everything is working fine.Data bands are independent from each other.
Problem is:
text in HeaderBand1 is missing if i have data in DataBand2 and not in DataBand1.All data is printed fine it is just that header is not.
In other cases like: i have data in both bands or i have data in DataBand1 and don't have them in DataBand2 header is printed just fine.
I can't use Print if empty property because sometimes (in other reports) i don't have data in borh bands and i don't want text from header to be printed.
Regards
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

problem with printing header

Post by Edward »

Hi

Please set PrintIfEmpty property of HeaderBand1 in true.

Thank you.
dikan
Posts: 202
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

problem with printing header

Post by dikan »

Ok...now i am confused. I said i don't want to print header if there are no data...and i said i can't use that property.
Using that prints header always...and when i have that as subReport i don't need header without data after it.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

problem with printing header

Post by Ivan »

Hello,

Please set the PrintIfEmpty property of HeaderBand1 to true and write following code in BeforePrint event of HeaderBand1:

Code: Select all

if ((BROMR.DataTable != null && BROMR.DataTable.Rows != null && BROMR.DataTable.Rows.Count > 0) ||
    (BROML.DataTable != null && BROML.DataTable.Rows != null && BROML.DataTable.Rows.Count > 0)) HeaderBand1.Enabled = true; 
else HeaderBand1.Enabled = false; 
Thank you.
dikan
Posts: 202
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

problem with printing header

Post by dikan »

Thank you. That did solve problem.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

problem with printing header

Post by Ivan »

Hello,

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

Thank you.
Post Reply