Suntower
Posts: 225
|
| Posted: 03/13/2008, 2:15 PM |
|
Hi,
Still using CCS 3.2. We have several reports with the Search box at top. We also have the 'Printer Friendly' link which opens the report in a new window sans Search Box.
What I'd like to do is put in the report heading a summary of the selected Search Fields. eg...
"For City=Redmond AND State=WA Ordered By Zip Code"
I'm looking for suggestions on how to do this efficiently. My first thought was to take the page's QueryString and strip out any parameters with no value. For example, I'd start out with the QueryString...
s_COUNTRY=&s_CATEGORY1=&s_CATEGORY3=&s_CATEGORY2=&s_CATEGORY4=&s_CITY=Redmond&s_STATE=WA&s_APPROVERCONTACTID=&s_ZIP=&s_COSTCENTER=
and strip it down to...
For s_CITY=Redmond AND s_STATE=WA
Yeah, that's kind of ugly, but I'd like a generic solution and if this can be quickly applied to all reports that would be acceptable.
Suggestions on the easiest way to parse this? (Yeah, I know how to do this in other languages, but I'm still a VB newbie.)
Next, where do I go to get the OrderBy statement to add to the parameter of page header?
THANKS!
---JC
_________________
---On a campaign for more examples and better docs! |
 |
 |
wkempees
Posts: 1679
|
| Posted: 03/13/2008, 4:26 PM |
|
http://forums.codecharge.com/posts.php?post_id=94047
Hope this helps.
_________________
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
|
 |
 |
Suntower
Posts: 225
|
| Posted: 03/18/2008, 12:00 PM |
|
Hi Walter. You're like a one man CCS support system. :D
Your solution is exactly what I hope to avoid... it means creating a custom description for -every- report. I want something generic---even if it's ugly.
What I need is the fastest way to parse the ccsForm array down to which members are actually 'filled in' by the user and include only those in the resulting string.
I can use the .where and .order properties, but unfortunately those also include various elements of the SQL query that I may -not- want the user to see. So it seems as though processing the SearchForm is the best way.
Any ideas?
THANKS!
---JC
_________________
---On a campaign for more examples and better docs! |
 |
 |
|