I have a quick question?
I have a report that contains a "TicketNo" parameter. This is a dropdown list and contains 2 types of values (example below)
'82736 - Change Request'
'78382 - Report Request'
How can I make a rectangle visible depending on which type of ticket was created? (Report request or change request)
So if a change request was selected, the rectangle showing change data would appear, and vice versa?
Appreciate any help as always!
There is a Rectangle object type in the Report Item Toolbox.
There you can set the border Style property to Solid an then add an Expression to its BorderColor property.
Write the expression as a conditional statement, setting it to Black or white depending on your condition, using an IIF statement.
Use the visibility property of the rectangle
Goto Rectangle Properties
Select visibility
Choose 'Show or hide based on an expression'
Input expression '=Parameters!TicketNo.Value=82736' assuming ticketNo is integer
Rectangle will be hidden if the condition is true.
Related
I have a report on SSRS and I have just one parameter called SSCC
I want to highlighting for index SSCC
I mean if I used this SSCC number : 350110073200168575
I want to fill color must change yellow, just this number of SSCC
And sometimes my SSCC number will be multiple but I just want to see for one SSCC
I added screenshot.
You can see my report preview:
Could you help me please?
Have a look at: Adding Conditional Formatting (Reporting Services) on MS Docs.
Changing Text Color Based on an Expression
To make the contents of a text box render negative values in red for a field called Profit, open the Properties pane and use the following expression in the Color property:
=IIF(Fields!Profit.Value < 0, "Red", "Black")
You just need to add a condition to the background color of the textbox that will contain the record. Then compare the field to the parameter value, with your selected colors as the return value.
=IIF(Fields!SSCC.Value = #Parameters!SSCC.Value,"Yellow","[Your default color]")
I have a data set with multiple rows. The columns are name and plot; plot is a binary image file. If I want to display the plot whose name is secondPlot, for example, how would I do this? I can display just the first plot with =First(Fields!plot.Value, "DataSet1") but haven't had any luck with retrieving a plot with a certain name value.
I found if IIf function but am unsure on its usage or whether it's actually what I'm looking for anyway. =First(IIF(Fields!name.Value = "secondPlot", Fields.plot.Value, Nothing)) gives the error "The definition of the report '/MainReport' is invalid", for example.
For clarification, I'm typing this in Insert>Image>Database source.
Add a tablix component to your report, then assign your dataset to your tablix in the DataSetName property.
Delete columns and rows leaving only a textbox. Right click in the tablix and select Tablix properties... go to filter tab and add a new filter.
For Expression select Name, operator = and value use ="secondPlot".
The tablix will filter the row that contain secondPlot name and you can show the image in the tablix textbox by configuring background image property in the Fill tab.
Right click the textbox and select Textbox properties / Fill tab, in background image pane use settings like this.
UPDATE:
If your image is PNG, BMP, JPEG, GIF or X-PNG you can select the proper MIME Type.
Also if your image is encoded in Base64 you can try:
=System.Convert.FromBase64String(Fields!Plot.Value)
In the Use this field: expression.
Don't use any expression for the textbox. Just use the image field as textbox background.
Let me know if you need further help.
I have a report request to show either chart or table using SSRS. I am mew to SSRS so not sure of woraround to make this work.
So far I tried below:
1. Create a "ShowDetails" parameter with
Data type - Boolean
Parameter Visibility - True
Available values - none
Default Values (non queried)- =False
2 In the chart properties set the Hidden to -> =Not(Parameters!ShowDetails.Value)
and toggle to textbox1 which I created for expand and collapse option.
Problem is radio button is not working ie., when I change the option to true no action on chart.Have to control the chart only by expand and collapse option.
Looking for other solution to show either chart or table based on show or hide parameter.
Thank You
Shilpa
I would write the expression in the Hidden Property of the chart like this instead.
=IIF(Parameters!ShowDetails.Value="False",True,False)
The above expression with some work around got me the answer. Below are the steps
Create a "ShowDetails" parameter with Data type - Boolean,Parameter Visibility - True Available values - Label-No, Value -True and Label-Yes, Value -False Default Values (non queried)- =True
2 In the chart properties set the visibility->Hidden -> =IIF(Parameters!ShowChart.Value="1",True,False)
With the above solution am able to hide and show the chart based on input parameter.
Thank You
Shilpa
I have my SSRS report working properly, row visibility displaying correctly etc. However I would like to display my row visibility by using text as the clickable object, rather than the [+] & [-] sign.
Is this a possibility within SSRS?
Yes, you can do this with a Parameter:
Create a HideRow Parameter, type Boolean, Hidden. Set the default of the HideRow Parameter to your desired Hidden value for the Row when the Report is first executed.
Set the row's Hidden value to =Parameters!HideRow.Value
On the properties of the textbox you want to to control the row visibility, set the Action to "Jump to Report". Set the Report name to your Report name. Set the HideRow parameter value to =Not(Parameters!HideRow.Value)
This hyperlink will reload the report with the opposite HideRow parameter value.
Using reporting services and trying to hide a field placeholder value when it does not equal "View" The value is hyperlinked to a subreport and is located in a bordered textbox inside a tablix. If I use the visibility feature for the text box, I can hide the non-view hyperlinks with an expression, but it hides the entire textbox and the textbox borders go away for that cell--I really want them to remain and just show the empty cell. If, instead, I try to hide the value on the placeholder level, which does not present the visibility option, and I attempt to evaluate the expression for the placeholder value to Nothing or '' when it is not valued as "View" then I get a hyperlink dash display in the column where I think it's attempting to render an unvalued hyperlink, which I really don't want. I just want an empty, bordered textbox.
Any way around this?
One solution is to change the visibility of the textbox value like this
IIF(fields(View.value) = 'true' , fields(TextBoxVariable.value), " ")
note that " " at the end will hide your dash
Or you can put a rectangle in the tablix cell and set its border, the you can put a textbox inside of the rectangle and change the visibilityof the textbox easily
put you link action on placeholder properties: Action - go to subreport, then put hidden expression on textbox: IIF(Fields!NameFields="View", true, false)
it works for me.
I know this is an old post, but I recently ran into this same issue.
Remove the expression from the text box properties and add it to the expression box of the field (right-click on the field and instead of choosing Text Box Properties>Visibility, choose Expression from the context menu). This will replace the field with an expression and the border lines will still exist.
Here's what I added to my expression:
=IIF(FORMAT(CDATE(Fields!ApprovedDate.Value),"dd-mm-yyyy") > "01-01-1980",Fields!ApprovedDate.Value," ")
I think that the easiest way to get rid off this hyperlink dash, is to change the font effect of the text-box. Just select Font-tab from text-box properties and from there, click fx-button of Effects and put somethin like this as expression:
=IIF(Fields!YourValueField.Value is nothing, "None", "Underline")