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

 Collapsing spaces in report label

Print topic Send  topic

Author Message
jacem

Posts: 87
Posted: 12/07/2010, 12:50 AM

Hi,

I have a label on a report and the data for that label has multiple spaces between standard characters of the alphabet: A B C D

However when the report displays the spaces between each letter are collapsed to a single space between each letter. If the field is changed to a textfield the spaces are there between the letters but when switched back to a label the spaces are collapsed to a single space between each letter. I have tried change the text type to HTML and the format to memo from Text with no change. It does the same thing in multiple browsers IE, Chrome etc....

Are labels supposed to have spaces collapsed when displayed as some sort of standard for html?
View profile  Send private message
datadoit
Posted: 12/07/2010, 6:14 AM

Yes, HTML will strip them all down to just one.

You may be able to get away with replacing them with   or chr(32)
in some browsers.

Probably your most reliable method would be to pad each character using
CSS. Create a BeforeShow routine for the label that will loop through
each non-space character, then wrap it in something like <span
style="padding: 0px 10px 0px 10px">$TheLetter</span>.
jacem

Posts: 87
Posted: 12/07/2010, 1:20 PM

Thanks for the reply datadot.

I learn something everyday it seems.

I will take your advice on 'styling' the field before showing.



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.

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.