CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Filter grid by querystring minus 1

Print topic Send  topic

Author Message
charles

Posts: 59
Posted: 10/19/2006, 2:29 AM

Hi folks,
I have a grid form that is filtered by the s_period_id parameter sent over the url.
How can filter this grid by the value of the querystring -1.For example if the value of the querystring is 23, how can i filter the grid to show results of s_period_id for 22.
This what i have done so far: i calculated the value with the following code
dim sentperiod1
dim sentperiod2
sentperiod1=CCGetparam("s_period_id",empty)
sentperiod2=((sentperiod1)-1)
The value of sentperiod2 is what i actually want to filter the grid with.What parameter type,url?expression etc will i use? and how do i go about it.Any Ideas?
Regards,
Charles
View profile  Send private message
charles

Posts: 59
Posted: 10/19/2006, 3:14 AM

I figured it out.
This is what i did.
i created a function called getPrevperiod()
Function GetPrevperiod()
dim sentperiod
sentperiod=CCGetparam("s_period_id",empty)
Getprevperiod=sentperiod-1
End Fuction
I added this function to the page.
On the grid's where parameter :period_id=getprevperiod()
parameter type=expression.
The grid filters to the previous period as desired!
Just Sharing in case anyone needs this.
Regards,
Charles
View profile  Send private message
Glenn Rathke \(Soft Design Consulting\)
Posted: 10/19/2006, 6:15 AM

Nice function .

What happens when sentperiod = 1 ?

Glenn


"charles" <charles@forum.codecharge> wrote in message
news:64537501769c2a@news.codecharge.com...
>I figured it out.
> This is what i did.
> i created a function called getPrevperiod()
> Function GetPrevperiod()
> dim sentperiod
> sentperiod=CCGetparam("s_period_id",empty)
> Getprevperiod=sentperiod-1
> End Fuction
> I added this function to the page.
> On the grid's where parameter :period_id=getprevperiod()
> parameter type=expression.
> The grid filters to the previous period as desired!
> Just Sharing in case anyone needs this.
> Regards,
> Charles
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

wkempees


Posts: 1679
Posted: 10/19/2006, 7:15 AM

:-)
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
charles

Posts: 59
Posted: 10/19/2006, 7:20 AM

Thanks glenn for your observation.For the purpose i needed the function for it does'nt really matter.
You see, i have a main grid that filters by s_period_id and displays all banking related transactions for that particular month including running balances of credits and debits.But i needed something that can give me the last balance of the previous month.So i am using this hidden grid just to obtain the last balance of the previous month to the month the user inputs to the search form.
If s_period_id is 1, then grid returns a null value which defaults to 0 as the balance B/F.That's what i want!
Regards,
charles

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.