Wednesday, March 28, 2012

How to format a part of a textbox

Hey all,

Does anyone know a way to format part of a textbox ? I need just the column value to be bold.

Like this:

"Just a static text Some BOLD Text other static text..."

My expression:

="Just a static text " + Fields!FieldName.Value + " other static text..."

Is there a way to apply formatting just to Fields!FieldName.Value ?

Thanks!

myLabel.Text ="hello " +"<b>" + Fields!FieldName.Value + "</b>" +" not bold";

the above will work just fine for you (in VB.net)

|||

U can also apply CSSClass via <SPAN></SPAN>

|||

The above suggestions can't work because it's aReporting Services textbox and not just a regular asp.net textboxWink

|||

Well, you may not like this suggestion...

how about having three text boxes. Set the middle textbox to be bold.

|||

looks like thats the only option... i know u can type in alt+89 will give u Y but i couldnt find something that will make something bold... if u can put latin characters in then u can some those keystrokes.

Hope this Helps.

Regards

Karen

|||

Hi,

Thanks for the suggesion :)

I have tried it. It's also not an option, when I place 3 textboxes I have an annoying spaces between them and an alignment problem.

I suppose I'll have to leave it as normal text and to give up the "bold idea" :(

|||

Hi,

From your description, you want to format a part of contents in textbox of reporting service, right?

Unfortunately, Currently, Reporting Services doesn't support rendering "HTML as HTML" in order to avoid the HTML injection attack.

Now I just find two possible workarounds for your from russch's blog.

Post-processing: After a report has been fully rendered, intercept the document and re-process it, turning the HTML (displayed as a string) into HTML which is "really" displayed.

Custom Control (2005 only): One could theoretically build a custom control in 2005 which takes the HTML/RTF, saves the rendered output as an image, and then displays the image inside the custom report item. This looks really hard as the managed GDI namespace doesn't give us anything to easily approach this sort of scenario.

Quoted from Russch's blog.
http://blogs.msdn.com/bimusings/archive/2005/12/14/503648.aspx

Thanks.

|||

Thank you very much!!!

I'll try this.

sql

No comments:

Post a Comment