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

 [Solved] Result appearing at left top of page instead of ...

Print topic Send  topic

Author Message
Markie


Posts: 251
Posted: 12/26/2008, 4:24 AM

I've made some custom code and I would like that the result of the code appears in a label somewhere on my page. The code is working, but the result appears at the very left top of the page instead of in the label.

My code:

$old_name=$uploaded2->Label2->Getvalue();
$replace_name = array("jpg","á", "ä", "é", "ë", "í", "ó", "ö", "ú", "ñ", "Á", "Ä", "É", "Ë", "Í", "Ó", "Ö", "Ú", "Ñ", "¿", "?", "!", "'", " ");
$newname = str_replace($replace_name,'', $old_name);
$NameChunks = explode(".", $newname);
echo $NameChunks[2];
echo $NameChunks[3];
echo $NameChunks[4];
echo $NameChunks[5];
echo $NameChunks[6];

the result should appear in Label1

The settings of Label1:

Control Source Type: code expression
Data type: text
Content: HTML

What's the answer to my problem ?
I have looked at this solution:
http://forums.yessoftware.com/posts.php?post_id=97665

but this error appears:
Fatal error: Call to a member function SetValue() on a non-object ...
_________________
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
datadoit
Posted: 12/26/2008, 4:38 AM

Instead of echoing, use SetValue().

$Component->SetValue($NameChunks[2].$NameChunks[3].etc);
Markie


Posts: 251
Posted: 12/26/2008, 5:05 AM

Wonderfull, this does the trick !
Merry Christmas to you, Datadoit
_________________
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

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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