CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Filter for grid

Print topic Send  topic

Author Message
dazed_o1o
Posted: 07/11/2002, 12:59 PM

I have a grid I created with CCS that I would like to filter based on
several factors. For Standard Users (GROUPID=1), I would like to filter the
results based on the session variable USERID. For Management (GROUPID=2) I
would like to filter by DEPT. Finally for Admin (GROUPID=3) I want all of
the results displayed.

I can filter by the USERID, but I am getting stuck with the rest of the
requirements.

Any Suggestions?

Geert van der Ploeg
Posted: 07/12/2002, 4:52 AM

Add a "before execute select" event.

In that event you build your own query, depending on your needs.

$query = "select blablabla ";
switch (get_session("groupid"))
{
case "1":
$query .= "where userid = ".getuserid_from_url();
case "2":
$query .= "where dept = ".getdept_from_url();
case 3":
$query .= "";
}

something like that...

Maybe it's better to modify the $this->Where variable, instead of a
completely self-written query...
Judge for yoursef.

Eitherway, I do not think it's possible to get it right only using default
things...


Regards,
--

Geert van der Ploeg
Triple IT


"dazed_o1o" <dazed_o1o@yahoo.com> wrote in message
news:agko2e$c05$1@news.codecharge.com...
> I have a grid I created with CCS that I would like to filter based on
> several factors. For Standard Users (GROUPID=1), I would like to filter
the
> results based on the session variable USERID. For Management (GROUPID=2) I
> would like to filter by DEPT. Finally for Admin (GROUPID=3) I want all of
> the results displayed.
>
> I can filter by the USERID, but I am getting stuck with the rest of the
> requirements.
>
> Any Suggestions?
>
>


   


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.