Disable a Page based on database field

Stimulsoft Reports.PHP discussion
Post Reply
Nathan
Posts: 21
Joined: Wed Dec 07, 2011 2:24 pm

Disable a Page based on database field

Post by Nathan »

Is there a way to disable a page based on a field from the database?
Example...
I have a Page1 and a Page2 in my designer.
Page1 prints every time, Page2 I want only to print based on what comes back from the database.
Or if I could disable Page2 based on a parameter in the query string, that would work too... is that possible?

Something like that would be:
http://mywebsite/reports?report_key=????&page2=false
Nathan
Posts: 21
Joined: Wed Dec 07, 2011 2:24 pm

Re: Disable a Page based on database field

Post by Nathan »

Never mind on this, figured it out.
If anyone was interested.

Just use the Conditions parameter on the Page properties.
I had to create two conditions...
First one looked at the data column and if its was false I unchecked the "Component is Enabled" checkbox.
Second condition looked at same data column but left "Component is Enabled" checked if it was true.

This enabled/disabled the page based on the database column.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Disable a Page based on database field

Post by HighAley »

Hello.

You don't need two conditions. If the Page is enabled by default then your just need to check one condition to disable it.

Thank you.
Post Reply