Solved

custom code in ssrs

Posted on 2008-06-24
1
1,397 Views
Last Modified: 2008-07-08
can anyone tell me if its possible to display a Message box or Alert in ssRS with custom code? Basically, i want to compare the value of two parameter and based on certain condition i want to display an Alert. e.g. There are two param of a reports; "Start Date" and "End Date". Is it possible to check the date before excuting the reports. I want to check that "Start date" must  be less than equal to "End Date". How can i do this ssrs?
0
Comment
Question by:mshan
1 Comment
 
LVL 12

Accepted Solution

by:
jgv earned 500 total points
ID: 21861851
I don't believe it's possible to test parameter values before the report is executed (only after). I would think that if the user has entered a start date that is greater than the end date your query would not return any records. If this is the case then you could use this method to provide a message that a mistake was made with the date parameters.

Select your main report table. In the "NoRows" property add this as the expression:
=IIF(Parameters!StartDate.Value > Parameters!EndDate.Value, "The Start Date cannot be greater than the End Date", "No records found matching your criteria")
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now