CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 [RESOLVED] Retrieve Value for Control - show field value

Print topic Send  topic

Author Message
MarioM1977

Posts: 23
Posted: 10/22/2010, 5:54 AM

I have a problem with Retrieve Value for Control action.

I have two textboxes: AAA and BBB (this one is hidden)

Both textboxes have same Control Source field (DDD) from SQL table. Both textboxes are in grid: CCC.

DDD value is "100" - only one record in DB.

AAA shows "100" value currently. Now I would like to show the value of record in field AAA but increased + 10. Finaly, textbox AAA should show 110.

I use Retrieve Value for Control action in BeforeShow for textbox AAA:
Control Name: AAA
Source Type: Exproession
Source Name: here I would like to read value of BBB testbox + 100

No idea how to do it.

Thanks for help.
View profile  Send private message
datadoit
Posted: 10/22/2010, 7:04 AM

Since the control is getting it's original value from the database, you
can retrieve it via:

$Container->ds->f("DDD");

so try $Container->ds->f("DDD")+100 in the Source Name property.

This will create the code:

$Component->SetValue($Container->ds->f("DDD")+100);

Make sure the control and database definitions are both set to Integer.
Also remember this is a Server-Side event, so this calculation will
only occur on a page load or refresh.
MarioM1977

Posts: 23
Posted: 10/22/2010, 8:47 AM

Unfortunately, it does not work. I got empty textbox.
----------------------------------------------------------------------
After checking and fixing the mistake in code - it works :)

Thanks
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.