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

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.

Related

Combining multiple drill through reports into one

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.

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 Line Chart--One line defined by a parameter (a subset), one line an overall average (parameter independent)

I am new to SSRS 2008R2 reports, so this may or may not be easy, although it should be very basic. Here is a table of what my data looks like in the query designer:
You can see that Provider.ProviderName (the Pro... column in the picture) is a parameter as well as the beginning and ending months. It is straightforward to add a line to a line chart depicting the No Show Value for the provider selected in the drop-down menu for the report (each month is one data point, typically for 12 months). But I cannot figure out how to add a line that shows the monthly average No Show Value across all providers, for the same selected time period, no matter what Provider is selected. Any ideas?
I would keep the Provider parameter definition in SSRS but unlink it from this dataset, so that it returns the results for all Providers.
Then in the existing Values entry (representing the Selected Provider), I would add an Iif function to return Nothing unless the Dataset Provider Field matches the Parameter provider.
Then I would add a new Values entry (series) for the Average No Show Value which will aggregate across all Providers.

Trying to rename filters in Report Builder

I am working with SSRS 2K5 and I have some questions that I haven't been able to answer via Google related to Report Builder. I have built my report and I am using a Model to generate the report. It is my understanding that Report Builder does not support parameters when the underlying datasource is a model so I have setup a filter that the user is prompted to fill in prior to the report being generated no problem. Here are my two problems:
The filter in question is a date field. If I set my filter to do a BETWEEN (date from to ) there is no option to prompt the user for the values prior to the report being ran. Is there some way to get around this?
If I was able to get the above desired date range effect by placing the date field in the filters area twice: once with a condition of 'Before' and the other with a condition of 'After'. The problem here is how the filters are displayed namely Date and Date 1. Ideally I'd like these to be displayed as Start Date and End Date, respectively. Is there any way to do this?
Please let me know if I need to clarify anything or more information is needed.

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