CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 reuseable include page

Print topic Send  topic

Author Message
velsto

Posts: 13
Posted: 07/02/2009, 2:47 AM

Hi
I have an include page, 'inca', which I want to include twice in a seperate page, 'maininfo'. But depending on which one of the two instances of the include page is executing, I want to change the where clause in a grid in the include page.

How do I determine which of the 2 include pages are running?

Thanks
View profile  Send private message
damian

Posts: 838
Posted: 07/02/2009, 3:03 AM

are you making things overly complex?
can you do this with 2 different include pages?

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
velsto

Posts: 13
Posted: 07/02/2009, 5:14 AM

Hi
The thing is that the functionality in the include page is a rather complex grid and the only thing different between the 2 instances of the included grid would be a change to the where clause of the SQL.

Using the include twice is the only way I can think of reusing the code
View profile  Send private message
feha


Posts: 712
Posted: 07/09/2009, 1:02 PM

You will need to change your query in an before Select event on the grid ...

the condition depends on what do you want to achieve ...

if you want to detect in what current page is included use the constant FileName

hope this helps :-)


_________________
Regards
feha

www.vision.to
feedpixel.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.