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

 Record and Grid

Print topic Send  topic

Author Message
Guy


Posts: 60
Posted: 08/25/2005, 5:14 AM

Hello,
I have a form record and i add on the same form a grid with a filter (with the same parameter for the record)
It doesn't work, the grid display all the records.
I just say that the file for the record form and for the grid it's not the same.
Sorry for my poor english !
Thanks
_________________
CCS 3 - PHP 4 - MS SQL 2000 - IIS 5
Guy
View profile  Send private message
DonB
Posted: 08/25/2005, 6:20 AM

If the filter is a Search form, it's not enough to only define the Search.
The search parameter must be added to the Data Source of the grid. You do
this by adding a 'Where' parameter to the Data Source properties of the Grid
control.

To see the actual query used to load the grid with values, give the grid a
Before Execute Select event and put in this line of code:

$myGrid->ds->Debug = true;

(Note: the name of the grid control in my example is 'myGrid'. Change this
to match the name of your grid)

You will see whether the filter is actually being applied to your grid.

--
DonB

http://www.gotodon.com/ccbth


"Guy" <Guy@forum.codecharge> wrote in message
news:5430db636bf868@news.codecharge.com...
> Hello,
> I have a form record and i add on the same form a grid with a filter (with
the
> same parameter for the record)
> It doesn't work, the grid display all the records.
> I just say that the file for the record form and for the grid it's not the
> same.
> Sorry for my poor english !
> Thanks
> _________________
> Guy
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Guy


Posts: 60
Posted: 08/25/2005, 8:15 AM

Thank you for your response Donb,

First it's not a search form, it's a other grid in other page. In my first page (grid) i can go in record with parameter (no problem). In this form i add a other grid on other file. I add in datasource the parameter in the clause where (like in a record form) but it display all the records. The filter doesn't work.
Second, when i use your code to debug in the good place, nothing pass. Any information . is there a special thing to work ?
Thanks
_________________
CCS 3 - PHP 4 - MS SQL 2000 - IIS 5
Guy
View profile  Send private message
DonB
Posted: 08/25/2005, 2:55 PM

Sounds like you may have Remove Parameter set to 'None'? Evidently the
second page does not receive the parameter that specifies the filter (these
should show up as part of the URL string sent from 1st page to 2nd page.

Likewise, the Debug property is perhaps set on the 1st page when you need it
on the 2nd page?

--
DonB

http://www.gotodon.com/ccbth


"Guy" <Guy@forum.codecharge> wrote in message
news:5430de0a476484@news.codecharge.com...
> Thank you for your response Donb,
>
> First it's not a search form, it's a other grid in other page. In my first
page
> (grid) i can go in record with parameter (no problem). In this form i add
a
> other grid on other file. I add in datasource the parameter in the clause
where
> (like in a record form) but it display all the records. The filter doesn't
> work.
> Second, when i use your code to debug in the good place, nothing pass. Any
> information . is there a special thing to work ?
> Thanks
> _________________
> Guy
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


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.