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

 spaces stripped from left of label text

Print topic Send  topic

Author Message
kevind

Posts: 251
Posted: 03/15/2005, 9:42 AM

I'm coding an outlining / project tracking piece. I'm outlining using a 1.x.x section numbering scheme similar to outlining in MS word or the like.

So, my query calculates how many leading spaces a string of text should have based on its outline number so that the results should look like this:

section
____sub-section
_________sub-section

problem is that if i add spaces to the front of a label or do this in the query so the resulting text is formatted properly, the grid form is stripping the leading spaces before presenting the text.

Does anyone know how to prevent it doing this?

I know I can work around this using style settings set in the before show row event and I may end up doing this if nobody has a quick work around

thanks
kevin
_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
View profile  Send private message
peterr


Posts: 5971
Posted: 03/15/2005, 10:30 AM

Kevin,

I don't find it possible that grid would strip something that you output via a label. Aren't you seeing those spaces in the HTML source of your live page? Maybe you are not using the non-breaking space code ( ) ?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
kevind

Posts: 251
Posted: 03/15/2005, 11:50 AM

Hi Peter,
If I use a view in MS Access to build the text so that it flows like an outline and then use that column (an expression) in the grid it is getting 'left trimmed'.

So I decided to retrieve the label's value instead (reworking the query). I check the value of a hidden field and if >=4 I adjust the label's content to be 4 spaces plus the original content of the label.

if vTasksByProject.TextPadding.value>=4 then
vTasksByProject.TaskText.value=string(4," ")+vTasksByProject.TaskText.value
end if

this too seems to be ltrim'd. the content of the label is set to text - do i need to change this to HTML and build the string differently ?

thanks in advance


_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
View profile  Send private message
peterr


Posts: 5971
Posted: 03/15/2005, 11:56 AM

That's it, even if you manually created a HTML page with spaces in it, those spaces wouldn't show. If you view the source of any Web page on the Internet you will probably see hundreds of unnecessary spaces and they are not shown on the page because any page with so many spaces would become unreadable. For that reason there is the HTML non-breaking space that you can use:  
Therefore you'd need to change string(4," ") to string(4," ")
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
kevind

Posts: 251
Posted: 03/15/2005, 12:39 PM

thanks for your help.
2 things of update:

1) cannot use string(4,"mystring") only the first character gets used to create 'mmmm'

2) the label content seems to need to be set to HTML otherwise I get ampersands on the page

Thanks - got it working now
kd
_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
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.