Page 1 of 2
hide subreport
Posted: Mon Aug 02, 2010 2:18 pm
by majidsoft
hi
i have a sub report that contain a information
i want one of my filed in sub report if have no data or null data sub report not shown
on of my field in sub report have data that cause subreport show but i want if another field have no data then subreport not shown too
thanks
hide subreport
Posted: Mon Aug 02, 2010 4:27 pm
by Jan
Hello,
You can disable SubReport component with help of Enabled property. For example, code in BeforePrintEvent:
Code: Select all
if (condition)
SubReport1.Enabled = false;
Thank you.
hide subreport
Posted: Mon Aug 09, 2010 12:29 pm
by majidsoft
hi
i want to write something like this
if (text3.text=0)
subreport1.enable=false
this textbox is in sub report1 that calculate avg of on field
thanks
if you can send me sample please
hide subreport
Posted: Tue Aug 10, 2010 12:29 am
by Ivan
Hello,
During report rendering exist two instance of each component (minimum two instance). One instance - component in report template. Second instance - component which created for rendered report. During creation of second instance report engine calculate expressions and write it to second instance. When you write expression like this:
{Text1.Text}
you call instances from report template which does not contain calculated values from expressions.
You can:
1. Instead of "{Text1.TextValue}" expression use the same expression as in Text1.Text property, or
2. Use variables. In this case you can calculate value in variable, and then use this variable in expressions.
Thank you.
hide subreport
Posted: Wed Aug 11, 2010 3:50 pm
by majidsoft
hi
i dont understand you for example i have textbox in my subreport i want if textbox have 0 value subreport not shown please if you can send me on sample
thank you
hide subreport
Posted: Thu Aug 12, 2010 1:27 am
by Alex K.
Hello,
Please see the sample in the attachment.
Thank you.
hide subreport
Posted: Sat Aug 14, 2010 3:14 pm
by majidsoft
hi
look my friend i have one variable with int type i want to send number to this variable in my program and stimul check it
for example "if mp=2 then subreport .enable=false"
thanks
hide subreport
Posted: Sun Aug 15, 2010 12:23 pm
by Alex K.
Hello,
Please see the sample in the attachment.
Thank you.
hide subreport
Posted: Mon Aug 16, 2010 1:51 pm
by majidsoft
hi
thank you
hide subreport
Posted: Mon Aug 16, 2010 2:06 pm
by Andrew
Hello,
Let us know if you need any additional help.
Thank you.