Problem: Bookmarks that link to hidden report items still link when clicked, but you end up seeing the next visible item.
I have an SSRS report with a summary table (tablix A) that shows Customers Grouped by Parent Customer. The field containing the parent customer is bookmarked.
Then I have a Tablix (tablix B) with charts, again grouped by parent, with a page break for each parent. The Charts are suppressed (hidden using formula in the Visibility property for the Group parentno in tablix B) if there is not enough data to create senseible charts for that parent customer.
How can I disable the "Go to bookmark" action dynamically, or create a null bookmark instead, when I know the bookmark target will be hidden?
The end goal is for this report to export to excel, so I would also like to avoid the error "refrence is not valid" that appears when you click an invalid bookmark in excel.
This turned out to be not so difficult, although not immediately obvious.
When you go into text box properties, Action, and choose Go to Bookmark, you can use an expression to create the bookmark. If your expresion returns the static constant "nothing".. then SSRS will not create a bookmark. So this means you can use the same formula from your target item that decides if your bookmark target item is hidden or not to dynamically bookmark, or not.
Example if your expression for visibility property is
=IIF(CountDistinct(Fields!BusinessUnit.Value, "getMainData")>1,False,True)
Then the bookmark expression would be
=IIF(Parameters!AM.Value="ALL",Fields!BusinessUnit.Value,Nothing)
Related
Is there anyway to add a hyperlink to the category groups of a chart in SSRS (2008)?
Usually I'd go into the properties and and build an expression for the Url Redirect option. I've reviewed the properties of category groups and there isn't an Action tab like there is for the values properties.
If there isn't an 'out of the box' solution, is there a way around this?
In SSRS, you can't make category or series names actionable, but you can make the Series Values (the bars themselves) actionable.
Right click on the field under the "Values" section of the Chart Data context dialogue and select "Series Properties".
On the Action tab, you can then set the Action to "Go to URL". This is the closest you can get to this functionality in SSRS.
EDIT: If you export to Excel, the hyperlinks will not work.
I've done this numerous times in XHTML but I am not sure if it is possible to do in SSRS Reports: I am trying to create a (link) list that allows a user to click on and be moved to another point WITHIN that same report. Is this possible to create anchors and do this just like you would in XHTML? Thanks a lot!
(tools that are available to me are SSRS in BIDs 2008 environment as well as Report Builder 3.0)
You could use bookmarks.
First you add bookmarks to the points in your report you want a user to be able to jump to. Select the report item you want to jump to and in the properties pane find the Bookmark property and type a unique name in here for the bookmark.
Then add a Textbox or Image that the user would click on to take them to that bookmark. In Design view right click on this item and select the Properties option.
In the properties window select Action from the left hand side.
Choose Go to bookmark then in the Select bookmark box type the name of your bookmark that you created earlier.
OK this and you should be good to go.
I have created a SSRS main report with a repeater and a bookmarked textbox (item ID) for each repeated item.
For each item, I load a subreport with additional data.
I have created an action in a subreport textbox to navigate to the bookmark defined in the master report.
Unfortunately, it does not move to the bookmark when I click on it.
Is it a supported scenario?
Bookmarks do not work for numeric values.
I changed the definition of the bookmark and action to use =Str(Field!Id.Value) instead of simply =Field!Id.Value
And it worked.
Apparently this should have been simple. After lots of digging, I'm yet to find anything that works. I have a row group in my SSRS report whose visibility is toggled by a textbox. What I want is to have the text Show in the textbox when it's collapsed, and Hide when it's expanded.
But I can't find any property of the group that can give me its toggle state. I have found in a few forums that it's not possible. As a workaround, I've tried the InScope() function ( as suggested in http://forums.asp.net/t/1601570.aspx/1). But to no avail. Can anyone suggest anything?
I believe you are correct in stating that SSRS does not expose the ToggleState property for use in the report.
In these types of situations, I use report parameters to control the state of the report. For example, you could add a parameter named isGroupVisible to the report with a default value of 1 to represent visible. Set your group's visibility to that parameter, and set your text box value conditioned on the state of isGroupVisible. Then in the text box you set your actions to be go to a report, and set the report url to be the same report with the isGroupVisible = to the opposite of what it currently is.
You can decorate your text box all you want to give the users the indication that it can be pressed to toggle the state of the report.
Draw backs to this approach is that it isn't as snappy as the ajax calls SSRS does to expand visibility--it will post back to the server on each toggle press.
Advantages to this approach include much more flexibility in controlling the state of the report.
Reporting Services
I need to jump to a specific report according to the value that takes a variable data set.
For example: If the variable has the value = 2, then go to the report 'Informe_1' but if the value is = 4, then go to the report 'Informe_2', this automatically without having to click anything. That is a generic type of report which determines which of the 2 reports must be charged according to the value of the variable.
Currently I have in the properties of the variable, in action, go to report, but I need to specify the condition to be 'Informe_1' or 'Informe_2' according to the value of that variable (2 or 4).
I'm not aware of a way to automatically go to a specific report without the user clicking something; however, you can specify an expression for the Action on something and that way the user will get the report specified by your variable when they do click.
In Design view, right-click the text box, image, or chart to which you want to add a link and then click Properties.
In the item's Properties dialog box, click Action.
Select Go to report. Additional sections appear in the dialog box for this option.
In Specify a report, click Browse to locate the report that you want to jump to, or type the name of the report. Alternatively, click the expression (fx) button to create an expression for the report name.
Also, see Expression Examples (Report Builder 3.0 and SSRS) for more information about expressions.
You can also alter the visibility of a linked item similarly. To give an example, in some of my own reports I have a hidden #ReportParameter that I use to pass the report to return to when a Back link is clicked. If that parameter is empty I hide the link. I use Go to report and specify =Parameters!ParentReport.Value in the expression for the Action. For Visibilty with show or hide based on an expression selected, visible is false and hidden is true. That makes my Visibility expression =Parameters!ParentReport.Value = "".