CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Adding Interger Fields

Print topic Send  topic

Author Message
dwelsh
Posted: 10/09/2002, 10:53 AM

Is there an easy way to do this

create a label
and have it equal to something like this
{fld1} - {fld2}

simple adding or subtracting different fields to generate a new label display

xbill
Posted: 10/09/2002, 2:13 PM

It may not be the easiest way-
in CCS you can use the Custom Code option
on the BeforeShow event of the label
to alter the label contents.

The calculation syntax will vary
depending on the generation language.
I haven't found a way to do language
independent calculations.

For example- in PHP- for a label
"label" in the record "rec":

global $rec; // current record
global $rec1; // other record or control on page
global $rec2;

$x = $rec1->field->GetValue() - $rec2->field->GetValue();
$rec->label->SetValue($x);

You can cast the values and set the field types
depending on the types of controls (float, int, etc)

-bill

   


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.