SSRS / MDX Date Queries
- Category: SQL Server Reporting Services
- Hits: 18927
This Week:
-- Start Date (US format - mm/dd/yyyy)
=DateAdd("d", -(WeekDay(Today(),2))+1, Today()) // yields: 8/1/2011
-- End Date (US format - mm/dd/yyyy)
=DateAdd("d", -1, DateAdd("d", 7-(WeekDay(Today(),2))+1, Today())) // yields: 8/7/2011
-------------------------------------------------------------------------
-- Start Date (european format - dd/mm/yyyy)
=Format(DateAdd("d", -(WeekDay(Today(),2))+1, Today()), "dd/MM/yyyy") //yields 01/08/2011
-- End Date (european format - dd/mm/yyyy)
=Format(DateAdd("d", -1, DateAdd("d", 7-(WeekDay(Today(),2))+1, Today())), "dd/MM/yyyy") // yields: 07/08/2011
This Month:
Before and After, Highs and Lows
- Category: SQL Server Reporting Services
- Hits: 26941
With PHP & MySQL it's pretty simple: use individual SQL queries to get the count of yesterday, yesterweek, yestermonth, yesteryear and do the layout in PHP.
Now let's say I have one RDL or SSRS Solution. I could do a dataset per SQL query but it doesn't seem that ideal.
In Theory:
SSRS Redirect after a report is run
- Category: SQL Server Reporting Services
- Hits: 29147
This article serves to describe several workarounds or proofs of concept.
Why?
We have a first report which acts like a search page. You enter the student you are looking for by reference or name and if there is only 1 result in the results page, then we want it to redirect to the details report for that student automatically.
How?
So there are various solutions out there, here's an overview of some:
Method #1
- Create one report with all selectable reports as subreports - toggle visibilty based on parameter.
Method #2
- Add a button below "View Report" linked to some script code (requires change to ASP pages on the ReportingServer, ie. affects all reports on that server).
Method #3
- Use ASP instead of SSRS.
Method #4
- Use a TimeInterval refreshing the page after a certain time.
Conclusion
In the end, this came down to a design decision. Time spent on trying to find a solution was not considered to be warranted. My reports use a parameter for the connection string to specify which server and database to connect to and the follow on link was enough as a solution. My seniors advised that if we had time in the future we could expand on this further.
Google Searches that got me nowhere:
- ssrs process parameter after report execution
- auto-redirect after are a report is run
- ssrs vbscript post report processing
- ssrs auto redirect based on a dataset value
SSRS Parameters in Oracle Stored Procedure
- Category: SQL Server Reporting Services
- Hits: 50715
So this is regarding an error when trying to add parameters to a Stored Procedure of an Oracle database from within Microsoft SQL Server Reporting Services.
The Error
ORA-00911: invalid character ORA-06512: at "SYS.DBMS_UTILITY", line 114 ORA-06512: at line 1 (System.Data.OracleClient)
The Situation
I'm using Business Intelligence Development Studio 2008 to develop a Reporting solution on a Windows XP workstation. We are connecting to a SQL Server 2008 R2 Reporting Service (SSRS) with Team Foundation Server 2010. The database with our stored procedure is Oracle 10g.
The Stored Procedure
Rather than a returned dataset, our Stored Procedure updates a field in one of our Oracle tables and returns nothing. It accepts 3 parameters: The StudentID (reference) varchar2, Username (who's running the report) varchar2 and a JobID (request reference) number.
SSRS Repeat Headers in PDF Report
- Category: SQL Server Reporting Services
- Hits: 26495
I've set some tablix headers but when I request the same report in PDF format, the tablix headers only appear once on the first page. Every subsequent page simply displays the report header (which does not include the tablix header... obviously). I right-clicked on the header row of the tablix and checked the box "Repeat header columns on each page.
Reminder on SSRS row separator
- Category: SQL Server Reporting Services
- Hits: 24132
- XP SP3 Workstation
- Business Intelligence Development Studio 2008 (BIDS)
- SQL Server Reporting Services 2008 R2 (SSRS)
I have a report displaying room bookings. Each row lists the day, date, room name, start/finish times, booking details and the staff contact. I want an empty row to appear between each day in the list, so I have:
SSRS Retrieving Oracle Stored Procedure Success or ErrorLevel
- Category: SQL Server Reporting Services
- Hits: 47428
We have a report in SQL Server Reporting Services 2008 R2 (SSRS) reading from an Oracle 10g database which works great and lists all the details on a specific student. An additional request is that there appears a link that will run a stored procedure which
- Updates a timestamp in an existing table
- Inserts a row into an audit table
How?
SSRS AlphaNumeric Parameter Validation
- Category: SQL Server Reporting Services
- Hits: 26792
If you ever want to check the parameters submitted with a report for alpha numeric characters (so it doesn't contain symbols, punctuations, etc) then you should do this at the database level, and then get the report to complete the check:
The Plan
- User enters value in parameters and clicks on "View Report"
- Report passes parameter to dataset which gets formatted by the database
- Report retrieves (select) formatted parameter as a field value to use
- Report loads with changes based on returned value.
The Gist
- Add database level parameter check
- Add IIF in SSRS to confirm
Page 7 of 12
Credit where Credit is Due:
Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.
Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.
Thank you for visiting and, as always, we hope this website was of some use to you!
Kind Regards,
Joel Lipman
www.joellipman.com
Latest Articles
Accreditation
Donate & Support
If you like my content, and would like to support this sharing site, feel free to donate using a method below:

bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
0xb038962F3809b425D661EF5D22294Cf45E02FebF
Paypal:

Bitcoin:
bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4
Ethereum:
0xb038962F3809b425D661EF5D22294Cf45E02FebF

