CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Change the name of the data source of grid

Print topic Send  topic

Author Message
Snorky
Posted: 01/05/2004, 9:45 AM

Is it possible to change to tablename of the data source for a grid.
In this case in concerns different table name but the fields are equal.
No fancy query with relations etc. etc.

If yes, I use Php and MySQL.
What is the variable that I should change?
RonB

Posts: 228
Posted: 01/05/2004, 9:52 AM

In the toolbox the table nae is present. do not click and open the wizard but simply write the name of the new table in the textbox

Ron
View profile  Send private message
Snorky
Posted: 01/05/2004, 10:17 AM

Thx Ron,
I actually meant dynamically change the table name.

eg. depending on a choice (1 2 3) I want a grid to show records of table 1 2 or 3.
Therefor, I make a choice in a search form of choice 1 2 or 3.
I want the grid to dynamically take its info from the table related to the choice.

The solution I have used for now is:
Create 3 grids, and hide them.
Then unhide the one related to the choice.

But I rather have only one grid and change the data source name or the SQL syntax dynamically.
Don Safar
Posted: 01/05/2004, 2:22 PM

If the tables are all the same, then why not combine them creating a new
field with 1, 2, or 3 in it. Then you can dynamically change the "where
clause" to filter the records accordingly.

"Snorky" <Snorky@forum.codecharge> wrote in message
news:53ff9a3072efea@news.codecharge.com...
> Is it possible to change to tablename of the data source for a grid.
> In this case in concerns different table name but the fields are equal.
> No fancy query with relations etc. etc.
>
> If yes, I use Php and MySQL.
> What is the variable that I should change?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Nicole

Posts: 586
Posted: 01/06/2004, 5:38 AM

Hi!
Create the normal grid and while you know the source table name just replace it in SQL in the Before Build/Execute Select event

_________________
Regards,
Nicole
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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