Solved

custom code in ssrs

Posted on 2008-06-24
1
1,429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 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