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.
Related
I want to make a report where, after loading and rendering, the user gets a textbox where they can enter in a value. Then, I want to add a link to another report where it takes the value from the textbox and uses it as a parameter. Is this possible?
It's not elegant but....
You can do this but you would have to add the text box as a normal parameter in your first report.
You would then add the second report as a subreport (*see comments at end) and have it hidden if your textbox parameter is empty. You main report would only be visible if the textbox parameter is NOT empty.
So first run the report shows the main report with the subreport hidden, user then fills in the textbox parameter and hits view report, this will re-run the report but as the textbox now has a value, the main report will be hidden and the subreport visible.
You don't have to use subreports, you could just build two distinct parts of the report to show/hide but subreports might make it easier to manage and faster.
Is it possible to have a textbox link on a main report that uses the Action - Go To Report feature while passing a parameter AND going to a specific Bookmark on the subreport?
In short, a user clicks a text box, a report opens with a provided parameter, and jumps right to a bookmark.
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)
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.
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 = "".