CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge -> Programming

 before show question

Print topic Send  topic

Author Message
CCman

Posts: 6
Posted: 04/09/2005, 2:18 PM

Hi.. i am a noob here :-O i have a little question about the before show event in the record form

i need to count some items before the page is displayed.

something like this

select count(*) from table_items where user_id = UserID and items=item_id

item_id is a variable inthe URL
UserID is the session variable with the id of the user

then if the select return more than 1 the page display "you alredy have this item"


basicaly i need to translate this to codecharge "code"

any help?

thnkz =)





View profile  Send private message
Nicole

Posts: 586
Posted: 04/11/2005, 12:37 AM

Hello,
You need to execute custom sql query in page or form Before Show event. You can refer to CCS Help that provides sample code for it
http://docs.codecharge.com/studio/html/ProgrammingTechn...tomSQL.html?toc
To get URL parameter use CCGetParam() function, its description for ASP is http://docs.codecharge.com/studio/html/Components/Funct...tParam.html?toc
To get ID of logged in user you can use CCGetUserID() function, it is also listed under http://docs.codecharge.com/studio/html/Components/Functions/ASP/

_________________
Regards,
Nicole
View profile  Send private message
rclayh

Posts: 8
Posted: 04/11/2005, 7:32 AM

You actually could just put a label on the page and have it perform a DLookup in the Before Show event. You could assign the results to a variable and then set the visible property of the label based on the results. You can build this mostly from the stock actions in CodeCharge. I usually build as much as I can from the stock actions and then put them altogether in a custom action when I'm done. This way I have the right nomenclature for all the CCS parts.
View profile  Send private message
ccmann
Posted: 04/11/2005, 6:30 PM

ok! i made it..
i hate CCS.. i use CC =) more simple

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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