Combining multiple drill through reports into one - reporting-services

First time posting here so please be kind.
I've come from using PowerBI to achieve pretty much everything I need to with a couple of clicks to using SSRS 2008... and I'm having a hard time. Here's what I'm trying to do:
I have a main report that summarizes some data on how long it takes to close down help desk tickets. On that report I have a table with summary figures (ie 220 tickets were picked up after 5 working days, 18 tickets were reopened etc). I want to click the text-box that contains 220 and be taken to a drillthrough report that contain the same table with column headers and just different row sets in each case. There will be 8 drill through actions in total and I currently have 8 drill through reports. Only 2 of those are parameter based, the others just filter the dataset based on some conditions.
What I'm trying to work out is this: can my 8 drill-through reports be rolled into one, if they're just different views of the same dataset? I've created some calculated columns with values (Yes/No because boolean doesn't allow multiple values) which are easier to pass to parameters. I also have 8 parameters on my detail data set. I've set up actions (where parameter1 = yes for instance) to take me to my detail report and use the corresponding parameter each time. It should work... but it doesn't and I can't work out why. Currently its' complaining that I can't compare a boolean to an int16 - neither the value in my calculated column nor the default parameter value is boolean or int. So, am I trying to do something that just isn't possible? Has anyone else achieved this?
Edit: here's the parameter
The error I'm getting is
The calculated column that should be checked against the parameter is
=IIF(IsNothing(Fields!DatePickedUpByAgent.Value), "Yes", "No").
Here's how I defined the action to take me to the drill through report in this case
Here are the filters on the subreport dataset based on the parameters passed through from the main report. "NotYetPickedUpByAgent" is the example we've been discussing here. enter image description here

Could you please go through each of your parameters one by one.
I would suggest deleting all the filters and trying to run the report and subreport.
Then keep adding filter one by one.
I think issue can be any of the filter and not the one you think.

Related

SSRS Create As Many Tables As Needed (Using One Dataset) Based on a DataSet Field

I have a query that returns relevant data about inspectors and how long it takes them to respond to issues. The only parameters are a BeginDate and EndDate so for any given date range there could be anywhere from 0 to 100 inspectors.
I am using only one dataset and it contains an "Inspector" field that I'm hoping can be used as a filter to create as many tables as there are inspectors.
I know you can set filters on tables but from my (limited) SSRS knowledge, you must already have the tables created and the filters are typically hard-coded. What I need, is some way for the report to see how many Inspectors there are in the dataset and group those records into their own tables, repeating the same one created tablix over and over as needed.
This is being done strictly in SSRS 2012, not using a ReportViewer where back-end code could help me out unfortunately...
I don't have any code examples to provide, like I said I know you can do filtering but I am at a loss when it comes to doing something like this dynamically based on data... Sorry.
Depending on the report design you could either...
Single report with grouping
1. Create a single tablix.
2. Create a row group by Inspector and then add whatever fields you need to the details section.
3. You can optionally set page breaks between instances of your Inspector rowgroup from the rowgroup properties.
Sub report method
1. Create a subreport that accepts a parameter (InspectorID for example).
2. In the subreport filter the dataset using the parameter passed in so it only return data for a single inspector.
3. Add whatever controls you need to the report to handle a single Inspector
4. Create a main report
5. Add a dataset that gives you a simple distinct list of Inspectors, this will be used to pass parameters to the subreport.
Lets assume it just contains a list of InspectorIDs.
6. Add a list control to the report and set it's dataset property to the dataset that contains your list of InspectorIDs
7. Right-click in the list control's 'cell' and insert a subreport.
8. Set the subreport property to the subreport you created earlier and set that parmameter IsnpectorID to your InpsectorID field.
This will produce a subreport for each instance of inspector it finds.
Sorry about the format of this answer, in a rush!

SSRS report with "Checkbox"-like feature that adds filters to query

I have a SQL database and using SSRS to produce reports. They are both 2012 version. The data is well water levels that are record every hour. Originally I have the report displaying ALL of the data for a user selected well (dropdown list). The user can also select the start and end date (text box) But the well levels don't change that much every hour unless there is a significant rain/flooding event. So I want the user to have the option to choose only the noontime values for each day. Is there a way to have a checkbox that would either 1) change actual query the report is using or 2) include filter that says only display 12:00:00? The parameter options seems to want to include a date and I only want to filter by time.
Thanks
I think the solution for you is to add a parameter to your report to be able to select what information to show with 2 possible values - All / Noon only. Then add a new field / calculated field to your dataset to indicate which ones are noon values. Then use the new parameter to filter the values showed in the report.
Hope it makes sense.

Access - Modular reusable subreport

I would like to create a report which I can use as a sub-report multiple times on the same parent report. However, each occurrence of the subreport should have different values.
For instance, there is a table called DailyReport.
Records in this table contain:
Date, member, team, description
The sub reports should be for each team within a certain date range. However, the date range per subreport/team will not be the same.
So, if the date range for all teams was consistent, then I could create a single subreport, and do some Ordering on the resulting records to separate things out into teams.
However, with inconsistent date ranges, I can't utilize a single query, so the most straight forward solution I see is to create separate subreports and queries for each range of each team.
The problem with this solution is that if I decide to change the format of the subreports I must do so in each specific subreport--a lot of duplicate work.
I would like to create a generic query and subreport. The query and sub report would call VB functions which would return the relevant value.
This means my parent report has the same generic report on it multiple times. As each subreport is rendered, I would like to increment a value behind the scenes so that the functions which the generic query and subreport call know to return a different value.
However, it seems that's not how things work in Access. The subreports on a report are not rendered linearly. A subreport is created, and then "stamped" onto a report where ever required. This means that all of my generic subreports have the same data.
How can I define a generic report and query? Then plug in different values into the report and query while the report is being reused multiple times on the same parent report.
You need to look into the LinkMasterFields and LinkChildFields property of reports. They are designed for exactly this purpose -- to filter a subreport based on current data in the main report, without needing any code or even queries.
You are correct that LMF/LCF do not work on date ranges, only values. So use LMF/LCF for the team filter.
For the date range filtering, you can use an unbound form that launches the report as two parameters defined in the base query. Create frmLaunch, and add two text boxes minDate and maxDate. Set their Format property to Short Date so Access with interpret them correctly and provide the date pickers. Now modify the base query, adding two Date/Time parameters [Forms]![frmLaunch]![minDate] and [Forms]![frmLaunch]![maxDate]. Now, find your date field and set its criterion to Between [Forms]![frmLaunch]![minDate] and [Forms]![frmLaunch]![maxDate]. Add a button to frmLaunch that runs the code DoCmd.OpenReport "YourReportName", acViewPreview.
So, the goal was to make it possible to re-use the same sub-report multiple times on the same parent report, with full flexibility on how the subreport retrieves data.
I placed multiple instances of the same subreport on a parent report. On the subreports Open event I placed a line like
Me.Report.RecordSource = "SELECT * FROM someTable WHERE " & getCriteria()
nextCriteria()
Maybe its possible to pass a value that identifies which instance of the subreport is opening to the getCriteria function. Probably like a getCriteria(Me.Report.Name). But in this case I kept track of how many subreports had been produced in vb.
Unfortunately, if your subreport has controls which have a data source which is a vb function, all reports will show the same value for that control. To get around this I added something like getSomeValue() & "As [Some Value]" into the SELECT of the SQL statement above. Don't forget to add single quotes or hashes around getSomeValue() if you are passing a String or date.
That's basically it, it's a pain. But I couldn't find a more elegant way to do it.
Edit:
One major caveat I experience with doing this, is that although the print preview works correctly, when actually printing or exporting to PDF, some subreports would not be included. Maybe there is something else causing this...

SSRS ignore a field result

I guys
I'm having a slight problem with a report im currently writing.
So when i run this report it gives me a list of outcomes from a data source.
One of results is 'Closed' I want to exclude this outcome in my report. I cant exclude this in my SQL code as it doesn't bring back the null values. ( when no outcome has been given to a task yet i.e no one has had the time to do it yet i have set that in the expression to 'No Outcome'.)
So i want to know if anyone can edit my expression so it does not bring back the value of 'Closed'
=IIF(IsNothing(Fields!OutcomeDescription.Value),"No outcome",Fields!OutcomeDescription.Value)
Any Help on this would be great sorry if iv not explained this well.
Rusty
To do this, you'll want to add a filter to either your dataset or your table object - whichever is most appropriate for your needs.
For a dataset filter, merely open your dataset properties, and look for the filters tab. For a table, you'll need to go into the tablix properties. Setting up a filter from there is simple.
Filtering at the dataset level will drop all of the filtered records before any controls on the report could access them. Filtering at the object level would drop the filtered records from the control, but they would still be available to other controls. If your report only consists of a single table, and no additional objects, I'd recommend filtering on the dataset.

SSRS 2005 report with multiple datasets need to change parameter

All,
I've been working on a custom timesheet report that uses multiple datasets (8 to be exact). Each dataset selects the data by the same ID field which is currently input as a parameter. It works great like that. But now I'm told that the end user wants to input a date and have all the reports printed out for that date rather than having to enter in an ID each time. Each timesheet is 2 - 3 pages. It is intended to emulate a form and contains some data but a lot of blank areas to allow the field people to write in any changes that have occurred.
My question, is this: what is the best way of accommodating the new requirement? Should I build it all as one big dataset and use the date as a parameter?
Should I create a wrapper report that would prompt for the date and then use the existing report as sub report? Would that even work?
Is there any way I can just create a new date parameter and put that ahead of the ID parameter and get them to print out like that? I've got a few hidden parameter fields on the body that get used in the page header and are used to link some of the datasets.
any help is appreciated.
Easiest way to achieve this is indeed by creating a wrapper report with the date parameter. The data set in this report will then fetch all items (with ID) that match the query by the user. The report can then have a list for that dataset, with the original report as a subreport. If you pass the ID parameter from the dataset to the subreport you wouldn't need to change hardly anything in the original report.
Two things to watch out for:
the Report Header and Footer in a subreport are not rendered - these are only rendered for the wrapper report
you may need to tweak your page breaks in the subreport and on the new list in the wrapper report so each new form starts on a fresh page