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

 Add text to retrieved value

Print topic Send  topic

Author Message
andash


Posts: 18
Posted: 12/18/2007, 9:23 PM

Hi,
Can anyone shed some light as to how I can do the following in CCS3.2 & ASP.

In a report and a grid I want to add a text value 'VOL' to a field. If this field is empty however I want to show nothing.

So if {record_value} displays as 15, I want to make this show 'VOL 15'. If the record is empty then I don't want to display anything. I can add the VOL to the HTML area but that still shows when there is no value for {record_value}

Sounds like a simple {record_value}="Voll" & {record_value}.value somewhere but I can't work it out ( been away from this too long)

Thanks in advance
Andrew
_________________
Andrew Asher
www.it3.co.nz
View profile  Send private message
Oper


Posts: 1195
Posted: 12/19/2007, 3:23 AM

on before show event that field.

  
if Sender.value > " "  then  
   Sender.value=" VOL " & Sender.value  
end if  

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
andash


Posts: 18
Posted: 01/09/2008, 2:55 PM

Sweet. Thanks for that. :-)
_________________
Andrew Asher
www.it3.co.nz
View profile  Send private message
jsmonkey


Posts: 39
Posted: 01/15/2008, 6:45 AM

I copied along with this and it works for me too, Thank you. Is it possible to add a return between the 2 values? I am trying to combine 2 paragraphs for a click together form letter.

Something like:

if Sender.value > " " then
Sender.value=" VOL " &<BR> & Sender.value
end if

I am trying to do this within a textbox in a beforshow event.


_________________
-J
View profile  Send private message
mljonzs

Posts: 124
Posted: 01/15/2008, 7:49 AM

jsmonkey - rather than use the <BR> use VBCRLF in your code since you are inside ASP

like this
Sender.value = "VOL " & VbCRLF & Sender.value

_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
jsmonkey


Posts: 39
Posted: 01/15/2008, 9:10 AM

Awesome! VBCRLF worked! I was just starting to experiment with & Chr(13) & Chr(10) & when you replied, but I like the clean VBCRLF better.

Thank you!!

_________________
-J
View profile  Send private message
mljonzs

Posts: 124
Posted: 01/15/2008, 1:33 PM

You are welcome.

And, just for the record, the Chr(10) and Chr(13) would work too.
_________________
What does not begin WITH God, will end in failure!
View profile  Send private message
Oper


Posts: 1195
Posted: 01/15/2008, 6:39 PM

<br> will work too

but the text Context has to be defined as HTML
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
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.