SSRS: x-Axis display less characters - reporting-services

I would like to display less characters in the x-axis of my diagramm. How can I do this.
The x-axis now is too large:
I would like to display the characters like this here:
Is this possible?

Yes ofc you can.
For example you can use Expression if you want in Category group settings:
In properties chose Label Expression (fx button):
And create your expression, for example following showing 20 left chars + ... if lenght of string is more than 20:
=IIF(Len(Fields!groupX.Value) > 20,Left(Fields!groupX.Value,20) + "...",Fields!groupX.Value)
Where 20 is limit number of chars showed up in your chart...

Related

Number format in SSRS

I want to format the number like this:
(note:blank space is displayed as N/A)
14.3453453 is displayed as 14.35
12.1E-02 is displayed as 0.01
0 is displayed as 0.0 0
1 is displayed as 1.0 0
Every number upto 2 decimal places. But when I applied filter ya format expression, there is an error in place of a blank space, I want N/A there instead .
I don't think you will be able to do this using just the Format property. You will probably have to change the textbox's Value expression.
Try something like this.
=IIF(
IsNumeric(Fields!myField.Value),
Format(Fields!myField.Value, "f2"),
"N/A"
)

Percentage SSRS

I have two text boxes in my SSRS report.
The Total Number is simply - =COUNT(Fields!CommunicationId.Value)
The First Call Resolutions = =SUM(Fields!FirstCallResolution.Value)
The FirstCallResolution simply has a 1 for when it is a first call resolution and a 0 when it is not.
What would the expression be to get this to show the % correctly in SSRS?
Thanks
Edit : format code
You can do calculations in your expressions. Try
=(SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)) * 100
If you looking for a precision and a percentage representation., you can also write the below expression in the text box where you want the result to be displayed.
=(SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value))
You can then do a custom formatting for this text box in the Text-Box properties.
Right click on Text Box --> Text Box Properties --> Number-->Custom, and enter P1 or P2 or P3 and so on for number of decimal places after the decimal point.
You can also use the Round function in your expression. With this function =ROUND(...,1) you'll get one number after the decimal point. If you want two numbers after the decimal point then use 2 instead of 1, and so on.
=Round(((SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)) * 100),1)
Try =FORMAT((SUM(Fields!FirstCallResolution.Value) / COUNT(Fields!CommunicationId.Value)),"P")

how do I change a lookup value to whole a number in ssrs?

How do I format a number with 2 decimal places to a whole number?
I used the Lookup function to get a result, but formatting decimal to whole number does not work for this value. I did Text box properties -> number -> whole number doesn't work for one of my value. Also customize number to #,### but its not changing anything.
How do I make this value display as a whole number?
You may be confusing how the number is displayed (which can be controlled using text box properties) and it's actual value. It sounds like the value returned from the lookup is not a number, it might be a string/text value instead which would explain why it was not affected by number formatting.
One option is to convert the value to an integer (whole number) in the lookup expression itself, using a function to convert the value: CInt()
For example if your expression currently looks something like this:
=Lookup(Fields!SomeField.Value, Fields!SomeDatasetField1.Value, Fields!SomeDatasetField2.Value, "SomeDataset")
then you can change it to:
=CInt(Lookup(Fields!SomeField.Value, Fields!SomeDatasetField1.Value, Fields!SomeDatasetField2.Value, "SomeDataset"))
Or if you want to keep the original value, but just change how it is displayed then convert to a decimal value instead:
=CDec(Lookup(Fields!SomeField.Value, Fields!SomeDatasetField1.Value, Fields!SomeDatasetField2.Value, "SomeDataset"))
and then use the text box formatting options to control the displayed format.

SSRS custom number format

I am go to generate an excel file from SSRS, and
I want to format the number like this...
15 is displayed as 15
14.3453453 is displayed as 14.35
12.1 is displayed as 12.1
0 is displayed as 0
1 is displayed as 1
I can apply this in Excel but unable to apply in SSRS
[=0]0;[=1]1;0.##
Does anyone can suggest another way for me? Thanks!
am assuming that you want to know how to format numbers in SSRS
Just right click the TextBox on which you want to apply formatting, go to its expression.
suppose its expression is something like below
=Fields!myField.Value
then do this
=Format(Fields!myField.Value,"##.##")
or
=Format(Fields!myFields.Value,"00.00")
difference between the two is that former one would make 4 as 4 and later one would make 4 as 04.00
this should give you an idea.
also: you might have to convert your field into a numerical one. i.e.
=Format(CDbl(Fields!myFields.Value),"00.00")
so: 0 in format expression means, when no number is present, place a 0 there and # means when no number is present, leave it. Both of them works same when numbers are present
ie. 45.6567 would be 45.65 for both of them:
UPDATE :
if you want to apply variable formatting on the same column based on row values i.e.
you want myField to have no formatting when it has no decimal value but formatting with double precision when it has decimal then you can do it through logic. (though you should not be doing so)
Go to the appropriate textbox and go to its expression and do this:
=IIF((Fields!myField.Value - CInt(Fields!myField.Value)) > 0,
Format(Fields!myField.Value, "##.##"),Fields!myField.Value)
so basically you are using IIF(condition, true,false) operator of SSRS,
ur condition is to check whether the number has decimal value, if it has, you apply the formatting and if no, you let it as it is.
this should give you an idea, how to handle variable formatting.
Have you tried with the custom format "#,##0.##" ?
You can use
=Format(Fields!myField.Value,"F2")

Getting length of text selection AS3

How could I get the length number of a input text selected?
Like, if the text has 2 characters selected, then, it would return me length 2.
Is that possible?
Thanks.
Use textfield.selectionBeginIndex and textfield.selectionEndIndex to count chars currently selected.
var selected:int = field.selectionEndIndex - field.selectionBeginIndex;
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#selectionBeginIndex