How to change the length of underline in SSRS - reporting-services

is it possible to change the length of underline in SSRS?
i have using the HTML in SSRS expression instead of using underline tag.but no statement to change the length of underline. anyone can give advise? thanks

Related

SSRS get background color codes from database - expression

How can I make use below SSRS expression functionality to get background colors from database, as tooltip explains ?
you can get the background color value from the database consider the below example
For the text box
1. go to the textbox properties --> fill
2. select expression for the fill color option as shown in below screenshot
in expression give the field value from the dataset
eg: =Fields!color.Value
for that text box the color will applied .

SSRS: Conditionally change font color of certain items of a textbox

I've searched for an answer to this issue before, and found another way to get what I needed, but was curious if this was actually a possibility. Is there a way to change the font color of a single word in a textbox when the word is part of an expression? I know that if you have a text box with the words "This is red" then you could highlight the word red, and change the font color that way, but when you are using an expression to generate the text, you really don't get that option. Is this maybe doable using custom code?
This can be done in two different ways:
Break the text up into multiple placeholders. You can control the color of each placeholder independently. A textbox can contain as many placeholders as you like.
place the formatting in-line as HTML codes such as "This can have one word in <span style='color:red'>red</span>."

Formatting a parameter within an expression in SQL Server Reporting Services

I am working with SQL Server Reporting Service. I need to change the colour of a parameter used with in an expression. I don't want to change the colour of the entire expression hence can you please let me know the best way to do this.
="Population Statistics for" + Parameters!TotalPatientCntInPractice.Label
I would just like to change the colour of Parameters!TotalPatientCntInPractice.Label
Assuming you have SSRS 2008 or above, you will need to set up multiple placeholders in your textbox.
See Formatting Text and Placeholders.
Right-click anywhere in the text box and select Insert Placeholder. In
the Placeholder Properties dialog box, you can specify an expression
as the value of your placeholder.
These allow you to have separate text sections in one textbox.
Once you have these placeholders set up in your textbox, you can apply different formatting to each placeholder, including a different colour to the placeholder which holds your parameter label expression.
If your using 2005 or below, your only really option will be to use two textboxes as suggested by #Yakyb in the comments.
Have you tried configuring to use another style sheet as in the following tutorial?
http://www.wiseowl.co.uk/blog/s296/css-parameters.htm
Then style .TotalPatientCntInPractice.Label from there...
Hope it helps...
Besides other options, You can continue to your single place holder and enclose the text you want to be set in specific color inside HTML tag with Color attribute set to whatever color your like. You need to tell RS to Interpret HTML tags as styles. This causes the field to be evaluated as HTML. http://msdn.microsoft.com/en-us/library/cc627491(v=sql.100).aspx

In SSRS how to conditionally change the colour of a datalabel font on a chart when it appears on the bar

I have created a bar chart that shows values on data labels.
The Data label is placed outside the bar
But in some cases the label appears on the bar where the bar is too long.
In this scenario I would like to conditionally change the font/colour of the data label so that it's more visible.
However I can't see a way to dynamically determine where the label has been placed.
What I can think of is this. You can change the background/font color of all those series labels who's value lies in the range of 95%-100% of the maximum "Value". To be exactly precise as to what should be the threshold to change the bg/font color seems a daunting task, but you could play around with test data.
For writing the expression to change the font color,I would first change the dataset and add a column on the lines of PercOfMax. This column can be calculated easily in the dataset by using basic aggregate functions.
Then you need to go to the Chart Series Label properties-->Color and write the expression on the lines of -
=IIF(Fields!PercOfMax.Value>=95, "YELLOW", "BLACK")
As I said, you might need to do some more research to finalize the value of this threshold(which I am assuming to be 95).
Another solution to this problem is to use fill colour of the label and set its background to a bright colour (e.g. colour), and leave the font colour of the label black. Thus you can always see the label, and there is no difference when it's outside of the bar.

How to filter an SSRS Dataset to return single record to be used in Textbox properties

I'm a total newbie when it comes to SSRS, so please excuse any use of wrong terminology. But I have been given a task to create a report that will have have a dataset that will contain records that will be used to set Textbox's font size and weight, underlined, justification, and text values. Something like this...
Size Bold Underlined Text Identifier
10 Y N My Title Title
10 N N Some Def Def1
Sorry about the misalignment in spacing. Not sure how to do a table here. But basically, I'm wondering if there is a way to write an expression that would allow me to get the record with the Identifier of "Title" and use the other fields in the textbox properties. Something like the where clause of Inline Linq. But I'm at a total lose and would greatly appreciate some help on this. Thanks again.
You should be able to do this. In the TextBox properties, select the FontSize property and click on <Expression..>. Then in the expression box, pick the correct Dataset and field which will contain the font size.
Then repeat this process for the other attributes.