Drilldown Reports - sql-server

Help
I am attempting to create a drill down report using report server and Visual Studio 2005.
I have been able to create a tree structure, but the original report looks like it opened a new report. (Crystal Report)
This was done by the report hiding all other data apart from the drilled data and the data title.
I can’t seem to be able to do this at the moment or seem to find any help online to do what is needed.
Does anyone know how I can do this or know of any material online that could help?
Thanks

i can think of two different ways to interpret your question. 1. you want a table in a report that, when the user clicks on a specific row, drills down into the report. 2. you want a report that, when a user clicks on certain rows, it opens up another report that's a drill down of the data. for option one, read my blog here and tell me if that's what you're looking for.

Not sure which way you're asking, so I'll list both.
For all your data on a single report which is grouped you can right click on the row indicator on the table and select properties, then visibility. Inside visibility you should see a checkbox with "Display can be toggled by this item" then the dropdown will have a list of textboxes that are on the report. Just select the one you want to control the drilldown.
The alternative way is through report actions, which you create a separate report with or without parameters, and select the textbox and choose properties, goto action, select "Goto Report" then select the report to drill down to, and add your parameters.
Hope this helps.

Related

Google Data Studio: Filter inheritance options missing

I've asked this question on the Data Studio community page with no response, and haven't been able to find the answer elsewhere.
I need to stop 2 charts on a page from inheriting the page level control that I have set. From searching around, it appears that there used to be an option to disable filter inheritance, which would achieve exactly what I need. However, that option seems to no longer be available.
I've tried manually setting chart level filters that include all of the information I need, but they still seem to be overridden by the page level controls I have set. I've tried creating calculated fields that hard code the information I need, but they are also overridden by the page level controls regardless.
The comparison that I need to make is between an individual store's customer churn, and the average churn for all stores. The report is an overall report for all stores, with the ability to choose an individual store from a dropdown control to narrow down the results, so I can't set it up with chart-level filters as that would defeat the whole purpose.
Does the filter inheritance option no longer exist, or does it not apply to controls? Is there another way around this that I'm missing?
Thanks in advance! :)
Screenshot of the filter inheritance options missing:
No filter inheritance
Example Data Studio report:
Example report
UPDATE: I have figured out a temporary workaround, which is to set up a separate data source that does not include the fields referred to within the controls. However, this is not a workable solution for reports with a number of pages and a number of controls added, as it effectively requires a new data source for every control that I need to exclude (and sometimes that isn't possible).
Group
One way to ensure that the two specific charts (referred to as Excluded_Charts in this answer) are not influenced by Controls (in this case a Drop-down list and a Date range control) is to Group all charts except Excluded_Charts, which would result in the two charts operating independently from the rest:
Right-click on a blank space in the Report
From the drop-down click on Select > All charts and controls on page
Ctrl+Click on both charts in Excluded_Charts to exclude them from selection
Right-click on one of the selected charts
Click on Group from the right-click menu
Additionally, to make sure that the Date range control does not affect Excluded_Charts select both charts in Excluded_Charts and change the default date range from Auto to Custom.
Ungroup
To reintegrate Excluded_Charts back with the rest of the charts in the report:
Select the grouped charts (selecting a single grouped component will highlight all grouped components)
Right-click on one of the selected charts
Select Ungroup from the right-click menu
Additionally, remember to change the default date range of the Excluded_Charts back from Custom to Auto.
Editable Google Data Studio Report (Embedded Google Sheets Data Source)
I seem to have found a solution - the issue is that I was looking at filter inheritance rather than controls. Controls can be limited in scope by grouping them with the charts you want them to apply to.
Thank you very much for your help #Nimantha! I would have never figured this out if you hadn't pointed out that I was referring to filters rather than controls.

SSRS : Passing parameters to a subreport

I have a report containing 3 different subreports (each accepting a different set of parameters), and only displaying one of them depending on the value of a parameter.
When I choose to display any one of them, it gives me the following error:
Error: Subreport could not be shown
I need to have this visibility parameter let me decide which subreport I wanna see, then have the ability to pass the right parameters to that chosen subreport. Is there any way of doing this ?
Here are some screenshots:
https://imgur.com/a/n8bKny8
OK, I understand how you have structured the report now. I think the approach is a little wrong. It's like you are mixing two appraoches.
If you are trying to make this like a "Wizard", step-by-step approach, then you could simply change your main report to have 3 text boxes, one for each report, with a "Go to Report" action set. This will simply open the 'subreport' (it won't technically be a sub-report now) and then you can select parameters as normal. Optionally, format the textbox and make it look more like a button.
The other approach if you want to do this all in a single step would be to change the main report have all the parameters that are required across all subreports and allow the user to set them there (in the main report). These parameters can then be passed to the subreport via the subreport properties (parameters tab).
It really depends on the user experience you want to achieve but the simplest option would be the first option.
If this does not help, I'll try to post an example later tonight.

What control should I use for getting the following rows in ssrs?

I am to design a report which will be having given rows, I have tried with Tablex and Matrix, but I am facing issue with grouping.
Is there any other control or any custom control or any way of customizing Table
which I can use to design the following formatted rows in report.
Any link with demo, sample or POC would be great help.
Kind hard to tell what you're going for from your picture/description, but I'm guessing you may want to use a List object. You can put your group at the list object level, and then add text boxes, tables, images or whatever you need inside the list. You'll get a set of whatever is inside the list for each group, using the data from that group. Take a look at the sample/description here, which looks similar to what you're trying to do: here

How to dynamically populate a report?

Hopefully this is the last question I have about Access since I will be done working with it very soon.
I currently have a report that is generated from a form that is filled out when a "Run" button is pressed. A database primary key is searched for and the form is populated. When the user clicks a "Print" button, a printable report is generated, being populated by data from that form. All of that was easy.
Now, in the form, there is a single list box. That list box displays results for a transaction type depending on which transaction type is clicked. For example, clicking "Purchase" will yield all customers who have purchased something in the list box, and clicking "Sold" will yield all customers who have been sold something in the list box. There are many more transactions than those two, but that does not matter for the purpose of this question.
What I need to do is make the contents of that list box (which is populated by a query in VBA) for every transaction type appear on the printable report.
So for example, the report might look something like this:
Purchases:
John
Cindy
Alex
Sold:
Matt
Steven
John
Rob
Does anyone know a simple way to do this? I can vaguely think of how I might do this, but it is complex and I don't know the exact functions I would need to use. Basically I was thinking I would run the query that populates the list box, but then parse through each result in a while loop, and display it on the report.
Thank you in advance for any help!
A Report is a fairly static object in comparison to a Form. To dynamically change the data that is displayed in a report you would typically use the Where argument for OpenReport, usually on a button press and reading some value from a control on the currently active form:
DoCmd.OpenReport "rptName", acViewPreview, , "SomeField=" & frmName!ctlName
If the value on the form is a string then it needs to be surrounded with apostrophes:
DoCmd.OpenReport "rptName", acViewPreview, , "SomeField='" & frmName!ctlName & "'"
A report also has a Filter property that you might use, or you can programmatically set its RecordSource. The first option is the most common, and the easiest.
If the report has a listbox then you would typically modify its RowSource, using a query with a criteria that refers to a control on your form. But I would question why this is necessary, as the listbox would have no relation to the rest of the data in the report.
If you are talking about dynamically changing what appears on the report - moving and hiding controls, etc. - then this is a different question. You would need to first open the report in Design View. This is unusual and rarely necessary. Typically, you would create a separate report, perhaps copying the original report, and just use the button to decide which report to display. (There are Report Events that can be used to hide, or move, controls on the report - OnFormat, for example - that wouldn't require the report to be opened in Design View, but I don't think this is what you are looking for.)
Assuming that the report will be created using the recordset that was used to create the form, you could join the recordset that populates the listbox to the recordset that populates the rest of the form. If you, say, LEFT JOIN the recordset for the list box to the recordset for the form on the transaction type, the resulting recordset should have every thing you need to create the report required.
If the report needs to chabnge its format based on the transaction type, try using the OnOpen and OnClose Events for the report and the OnFormat Event for the Detail sections. I have some experience with reports like that. If you need more help with the events, add comments with some specific detail and I can probably make useful suggestions.

Conditionally setting visibility-toggling in SSRS

I have a report in SSRS 2008 R2 that lists medications and prescriptions. The prescriptions are hidden unless you click on the medication + box to show them.
Now, in some cases, we don't have any prescriptions listed for a given medication -- they're managed by an external provider, but we want to track their existence anyway. This leaves me with the case where we still have the + box, but clicking on it shows an empty line. Is there any way to conditionalize the ability to toggle the line's visibility? Thanks.
ETA: Ok, I just figured out a partial answer to this. I had a spare textbox available, so I added the text "Show scrips" to it and made that the controlling box for the toggle, and then swapped its own visibility depending on whether there were actually scrips to show. However, this makes the borders go away, as well as the contents. Short of removing all the borders (which might be the proper solution, actually), any suggestions?
Here's a thread that discusses this issue: you basically put the +/- into another column and show/hide that based on whether there's data.

Resources