CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 field sql result value not in grid

Print topic Send  topic

Author Message
avelino
Posted: 09/09/2003, 4:09 AM

Hello:
It's posible acces field value from actual row (before show row), to a field
width no label defined in grid?.

I have tryed width $dabatase->f(field) but this return a null value.
example :
--- in the before show row event.
global $DBdatabase;
global $formname;
if ($DBdatabase->f(field)=="S") {
$formname->labelform->SetValue("Verdadero");
}
else {
$formname->labelform->SetValue("Falso");
}

Thanks.
Avelino

RonB
Posted: 09/09/2003, 6:47 AM

did you use the field in the select statement? the result set is a result of the query send to the database. If you did not include the field in the query you will not be able to acces it's value since it does not exist in the resultset.

Ron
avelino
Posted: 09/09/2003, 9:17 AM

Yes in the select I have all fields in table.
thanks
avelino
mike
Posted: 12/23/2003, 3:40 AM

hi avelino!

i'm facing the same problem! currently, as a work around i've used hidden text fields for the fields that i want to reference ... did u manage to find a more graceful way to do this?

mike
RonB
Posted: 12/23/2003, 7:44 AM

I don't think you can acces fields that are not in the grid by referencing to that grid. If you created the grid with a select * from... statement you might think you could but you cant. The grid only holds those fields that are assigned to a controll. So if you want to use a field create a hidden field in the grid and assign the value you want to use to it.
You might try and acces the dataset directly, could be tricky though. Each dataset (the basis for a grid) is called $ds so you would have to time your code exactly right to make sure the dataset you are accessing still exists or isn't overwritten by the next grid query.

Ron
mike
Posted: 12/23/2003, 10:07 AM

ah, well ... hidden fields it is!

   


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.