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 -> PHP

 php code

Print topic Send  topic

Author Message
itzumar

Posts: 78
Posted: 12/29/2013, 7:17 AM

dear!

i need php code for using previous record value in next record formulaa. any hlep?????
_________________
Umar
View profile  Send private message
Markie


Posts: 251
Posted: 12/30/2013, 10:10 AM

Hi, I suppose you can store the previous record value in a (session) variable and use it for the next record formula.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
itzumar

Posts: 78
Posted: 12/30/2013, 10:15 AM

how to write code for session??????? plz write it for me as am beginner?????? or show some example
_________________
Umar
View profile  Send private message
Markie


Posts: 251
Posted: 12/30/2013, 11:19 AM

You can use the Declare Variable action. Add a Before
Show event to your record -> Add Action -> Declare Variable

Name: myvariable
Initial value: $Component->your_form_field->GetValue()

The generated code will look something like:

//Declare Variable @112-99384CD6
global $myvariable;
$myvariable = $Component->naam->GetValue();
//End Declare Variable

By the way, CodeCharge has a detailed help file which can help you out. You find it in the installation folder of CodeCharge. Just search for variable etc.
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
itzumar

Posts: 78
Posted: 12/30/2013, 11:28 AM

thanks alot dear
_________________
Umar
View profile  Send private message
eratech


Posts: 513
Posted: 12/30/2013, 8:14 PM

CCS uses a similar method when it's working out the running totals for Reports - I think it's in the Report - Before Show Row.

Either check the Help File (I agree - it really is quite good) and then make a sample Report to see the generated code.

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
spaul8808

Posts:
Posted: 06/07/2014, 4:50 AM

If you would use your previous page details on the next page then "sessions" is the best way because with the help of session we can fatch the value of previous page on the next page. If you are new in the programming field then below are the links for your help:
1. https://php.net/manual/en/book.session.php
2. http://www.w3schools.com/php/php_sessions.asp
---------------------------------------------------------------------------------------------------
Reference:- http://www.logicspice.co.uk/php-programming-services/
View profile  Send private message
MichaelMcDonald

Posts: 639
Posted: 06/07/2014, 3:55 PM

Quote Markie:
You can use the Declare Variable action. Add a Before
Show event to your record -> Add Action -> Declare Variable

Name: myvariable
Initial value: $Component->your_form_field->GetValue()

The generated code will look something like:

//Declare Variable @112-99384CD6
global $myvariable;
$myvariable = $Component->naam->GetValue();
//End Declare Variable

By the way, CodeCharge has a detailed help file which can help you out. You find it in the installation folder of CodeCharge. Just search for variable etc.




Extending this, you can use the declared variable as a POST value like this on a page redirect:

global $Redirect;

$Redirect = "pagename.php" . "?myvariable=" . $myvariable . "&myvariable1=" . $myvariable1

_________________
Central Coast, NSW, Australia.

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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