Page 1 of 1

Disable a Page based on database field

Posted: Wed Feb 13, 2013 3:29 pm
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

Re: Disable a Page based on database field

Posted: Wed Feb 13, 2013 9:42 pm
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.

Re: Disable a Page based on database field

Posted: Thu Feb 14, 2013 1:25 pm
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.