ssrs report builder year on year - reporting-services

How can I build a report when I select eg. Apr-Jun22 to show in a matrix Apr-Jun22 and another matrix Apr-Jun21 automatically OR either have a current period parameter and previous period parameter on selection - which ever way to have the two periods in one report on any date selection ?

Related

SSRS select parameter month and change par. first and last day of this month

i need to create parameter list of months and then (after select) recalculate two others paramateres in date format ([first day] and [last day]) of this month, can you please help me?
You are querying a database server to generate the list of months, although there's no need to do that. I suggest to rather create a list of months in the report and let the report calculate the month's names, so the language depends on the Language setting of the report (which can be the language configured in the user's browser).
For example, to calculate the Label for the Value 1, use an expression like =MonthName(1).
The Parameters FirstDay and LastDay (or just the values whenever you need them) can be calculated using these expressions:
FirstDay: =DateSerial(Today.Year, Parameters!Month.Value, 1)
LastDay: =DateSerial(Today.Year, Parameters!Month.Value, 1).AddMonths(1).AddDays(-1)

Calling a detail report using the intersection of Row and Column Sum as parameters

Description:
I have a report that that aggregates ATM transactions. This report has a Tablix with the following attributes:
Rows;
Vendor, Terminal.
Columns; Month, Day (Date), Hour.
The Row groups Terminal as child of Vendor and the Column groups Hour as child of Date and Date as child of Month. The Row Group and Column Group properties specify that each child visibility is toggled by its parent and the default if each child visibility to be hidden.
The Placeholder Value property for the intersection is set to Sum() transactions. The Action is set to Go To Report and specifies a detail report that accepts;
Start Date,
End Date,
Vendor,
Terminal
As parameters to the detail report. Each time the link is clicked, it calls the detail report with the dataset parameters set at runtime. So, for “North”, the detail report would reveal 41765 rows associated with the vendor “North”.
Problem:
No matter what resolution of detail in the matrix, when clicking the Sum() value to invoke the detail report, the dataset parameters set at runtime are sent to the detail report. For instance, if I drill down from Month to Date, I see that for Vendor “West” the sum of transactions on 2018-07-01 are 81. If I click that link to summon the detail report, it returns the total rows for the Start Date and End Date (1577 rows), rather than for the Date (81) as expected. This behavior is replicated throughout the intersection combinations.
Request:
How do I call up the detail report such that it returns only those rows specified at the resolution of the intersection in its current state? Ie: the sum at Month\Date: Vendor or the sum at Month: Vendor\Terminal or the sum at Month\Date\Hour: Vendor\Terminal….
What is the best method to accomplish the request? My research has not come up with any valid suggestions. I've attempted to use InScope() in the Placeholder Properties expression but can't seem to get it right.
Thanks for your help!
Your thought is correct, you have to use Inscope
Step 1:
For each parameter you use in your main report to call the subreport use an expression like
= Iif( Inscope("matrix1_Terminal"), Fields!Terminal.Value, Nothing)
For numeric parameters (like month number) set a dummy value like -1 because NULL values are not allowed
= Iif( Inscope("matrix1_Month"), Fields!Month.Value, -1)
Step2:
In the subreport change your parameters to accept NULL values (only for strings and dates)
Step3:
On the subreport adjust your query code to handle dummy parameter values
For string or dates
WHERE (terminal = #Terminal or #Terminal IS NULL)
For numeric values
WHERE (month = #Month or #Month=-1)
Important!!
Don't forget to pass to the subreport other parameters needed like filters in the WHERE of the original report
Tip: In the subreport use temporary string parameters for debugging and pass the values of your Inscope expressions

Pass same SSRS parameter value to next reports to maintain the path

I have a multivalued filter as a parameter on my reports. The values are the months of the years. The default value is the current month. The vaser can she the reports for each month by selection a month value from the filter.
There is also a text box in the report that shows the month value that which month has been selected as
[#Month.Label]
The problem is that now i need to maintain the navigation. From the main report there are links to the next reports. But when I click on the link to go to the other report the report shows the current month's report.
Is it possible that if i click on the link in the report the selected month value could passed to the next report instead of the current month value?
Graphical Description of the problem
If your have control over the client application then you probably want to expose the default value as a nullable parameter #ReportDate. This way you can pass in the optional value. The default will be used when no value is passed in. However, this will only work if the date filter applied outside of the report, otherwise, you will have to link to child reports as sub-reports to keep the value persistent between transitions.

Need to set a date parameter on an SSRS subscription

I have a report in SSRS that takes a single date as a parameter. What I want is for that report to have a subscription that uses the Saturday of two weeks ahead as the date (i.e., Monday 7/4 would give Saturday 7/16). How can I do this in the subscription? Looks like I can't do a formula in the parameter.
You have to set the default parameter value in the report, not in the subscription. An expression to use in the default for the date parameter would look something like this. There both add 2 weeks to the current date.
=DataAdd(DateInterval.WeekOfYear, 2, Today)
or
=Today.AddDays(14)
The default values can be set using the Report Parameters Properties dialog in the report designer. Just double-click on the parameter you want to change and the dialog will open.

SQL Reporting

I have a chart report that displaying monthly data and i want to display previous and next month data by clicking previous and next month.
How to display data in chart by clicking previous and next month.
Add a parameter to the report to specify the month. Create two text items in the RDL for this report for previous and next. Configure the 'jump to' item for these two tems to invoke this same report with correct value for the month deduced from the month value in the current report. It will be month - 1 for prev and month + 1 for next. In short, you will be calling the same report for both the prev, next and for the current month.
not sure what environment you are in, but you could use the following SQL to get you the next/previous months (using oracle). Use this as your starting point for building your query.
next button: select to_char(sysdate,'MM')+1 from dual
previous button: select to_char(sysdate,'MM')11 from dual
Once you get your requested month, build the remaining resultset.