How to hide the data ?

Stimulsoft Reports.NET discussion
Post Reply
rapid
Posts: 9
Joined: Wed Sep 10, 2008 4:33 am
Location: k

How to hide the data ?

Post by rapid »

Hi all,

I have the folllowing data print on the report.

address1
address2
address3
address4

How do i hide address4 if the value is 'None' ?
can we add code to disable or enable the field name if value is 'None' ? how ? where to add the vb code ?

Any suggestion please ?

Thank you.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

How to hide the data ?

Post by Stéphane »

Hello,

you can add a Condition to the Conditions property of your StiText : uncheck the Visible checkbox when your value is 'None'.

You can also use the BeforePrintEvent and set the Visible property.


Cordially,
Kakone.
rapid
Posts: 9
Joined: Wed Sep 10, 2008 4:33 am
Location: k

How to hide the data ?

Post by rapid »

Hi kakone,


How to add these BeforePrintEvent in my report ? I can't find it in the xxx.mrt or xxx.aspx.vb.

Can you tell me more ?

Thank you.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

How to hide the data ?

Post by Stéphane »

If you don't want to use the conditions, you can set the Enabled property of your StiText component in the BeforePrintEvent of the DataBand or any other band on which the StiText component is placed.

You can some add some code like that :
http://www.stimulsoft.com/livedemos/Rep ... onent.html
It will be saved into the xxx.mrt


Else, i don't use Stimulsoft in web but I think that you can add an event handler by code and set the Enabled property of your StiText component :
myDataBand.BeforePrintEvent = new StiBeforePrintEvent(script);
or
myDataBand.BeforePrint += new EventHandler(StiDataBand_BeforePrint);
rapid
Posts: 9
Joined: Wed Sep 10, 2008 4:33 am
Location: k

How to hide the data ?

Post by rapid »

kakone,

I appreciate your help. Thank you.
I manage to resolve it using condition.


Post Reply