Convert a passing SSRS Report parameter - reporting-services

I'm having an issue with a monthly report linking to a weekly report. The month parameter is passed through, however the weekly report does not allow that value for the parameter and results in an error. Since there is no monthly data, I do not want to show that value from the dropdown, but I would like the parameter to result in the display of a text that notifies the visitor that no monthly data is present and additionally show the weekly report.
Does anyone have an idea how to implement that feature?
Thnx!

Related

Query Parameter in Paginated Report

I am using Paginated Reports against a dataset in the cloud. I am trying to build a query parameter (not a report parameter). I want the report to function such that when user selects a date in the query parameter dropdown, the results will return the past 13 months, ending on the date they select in the slicer. I only see options for 'equal to', 'begins with','contains', 'range(inclusive)', 'ranage(exclusive)', nd 'custom'. I thought about modifying the query logic that is automatically created, but don't know how to modify it to bring back 13 months of data ending on the date they select in the parameter. Is there a way to do this in the paginated report itself? Trying to avoid having to create a PBI query and pass slicer values. Thanks for any ideas

Why SSRS are date parameters invalid when from a selection but not when "default"?

I have a selection of SSRS report where the client has requested that there is a different reporting range for each schedule e.g. The daily schedule run Daily reporting on sales for the past day, the Weekly schedule to report on previous week etc. I am trying to use one "sales" report to do this and have different options for the "Start" date as a parameter that can be selected. I have set these up as "Available" values rather than a "Default" with the following:
Daily = =DateAdd("D",-1,Today())
Monthly = =DateAdd("M",-1,Today())
I have set up a scheduled for this report to run using the parameter and selected "Daily" but when this runs I get the following error message:
The subscription contains parameter values that are not valid.
And then if I look at the subscription settings, the "Start" parameter is completely blank forcing me to select Daily or Monthly again. If I were to instead set it up as a default value using one of those parameter mappings then it works absolutely fine. Is there a way to have these optional parameters, or am I going to be forced to create different Daily/Weekly/Monthly reports each with their own default parameters for the start times.
Note: When I debug the report with those parameters it runs absolutely fine, the issue is with the scheduled versions not keeping the parameters.
If you have access to data-driven subscriptions with your SSRS version, you can pass in multiple dates, emails, etc. This allows you to send out different versions of the report in one subscription.
Another option would be to add another parameter with the Daily/Weekly/Monthly option. Then have the default date use this parameter value to determine the date value. Then you could have 3 subscriptions on the same report each with their own interval selected.
I hope one of these options will work for you.

is it possible to pass values to an access report from both vba and from a form?

I have a set of reports than currently run from a 'Select Report' form. Users select the report name and the start and/or end dates they want to view, and the query underlying the chosen report looks at the controls on the form to filter the report to the selected dates.
We now want to automatically run some of these reports every Monday morning, to send out via email. The start and end dates for the reports will be Date() and Date()+14. I know how to code to run the report and attach it to email, but I can't work out how to programmatically pass dates to the form's underlying query, instead of it looking to the form controls.
I've searched for the answer but can only find answers explaining how to do one or the other, but not if it's possible to do both using the same report.
I've tried to use parameters in the report's underlying query instead, but then I get prompt boxes for the date paramaters when I open the report from the form, even though dates have been selected on the form and are passed through to the report as expected.
I've also tried to pass the dates via openargs instead of looking directly to the form controls, but then I can't work out how to pass those openarg values into the query, only to controls on the report. That means the displayed start and end dates are correct, but the date filtering isn't applying to the report. From stepping through it, the report loads the data before the OnLoad code runs which sets the controls to the openargs values, so they are null at the point the data is filtered.
Any help is much appreciated, I'm a bit stumped on the best approach from here. Thanks.
I have reached a working solution for this, it may not be the most elegant but it allows me to use a single report in the two scenarios of opening automatically for a specific date range, or opening at the users request with user specified dates.
I have amended the reports so their default record source uses Date() and Date()+14 for the report date range.
When the report is opened by a user from the "Report Selection" form, "User" is passed through via OpenArgs. The OnOpen event of the form checks the value of OpenArgs and if it is set to "User", changes both the report's record source and the controls that display the report date range to use the dates entered by the user on the selection form.
#kostasK. thank you for all your input, you helped me get to this solution.

Seperate SSRS report weekly between a date range

I currently have to run a report weekly back to 2014 till now. Is there a way where I can provide it a date range of 4 months and the report can be divided by calendar weeks within the date range?
Any questions, feel free to ask. Thanks
Create a data-driven subscription on the report.
Build a query that returns a table with one row per each set of parameter values you want to run. Assign the columns to the correct parameter and then run the subscription.
If you have specified a file share as the output, all the different versions of the report will output to that share.
Obviously this requires you to provide SSRS access to that file share.

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