Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 1234»»»

Displaying a Pop-up message in SSRS 2005 Expand / Collapse
Author
Message
Posted Wednesday, April 22, 2009 8:35 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, June 11, 2014 2:54 PM
Points: 41, Visits: 72
Comments posted to this topic are about the item Displaying a Pop-up message in SSRS 2005

§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§

always Happy, always Prasanna
Post #702865
Posted Thursday, April 23, 2009 2:45 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 12, 2009 1:32 AM
Points: 27, Visits: 65
Does the pop-up message (not the text box) works when the report is deployed on the Reporting Server?
Post #702965
Posted Thursday, April 23, 2009 4:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 9, 2011 9:20 AM
Points: 7, Visits: 25
Hi,

I am not able to get it to work on my ReportServer. It reports "Error during processing of ‘IsvalidNumber’ report parameter. (rsReportParameterProcessingError)" error. Any idea?

Thanks, Jirka



Post #703024
Posted Thursday, April 23, 2009 5:09 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, October 12, 2009 1:32 AM
Points: 27, Visits: 65
I tried to achieve this some days ago. The problem here is when you are at the VS IDE the VB.NET code works fine. When the report is running on the Report Server it can't understand the VB.NET code as it runs in the Reporting Service environment. I wish there could be a way to embed some Javascript code into a report (as the report runs in the web environment) to achieve this. But I don't think it is possible at present.
Post #703044
Posted Thursday, April 23, 2009 9:43 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, July 17, 2014 10:56 AM
Points: 3,924, Visits: 1,607
Just tried but failed. Throws some invalid error - rsReportParameterProcessingError. Don't know what the heck is that.
'm not a .Net developer.


SQL DBA.
Post #703349
Posted Thursday, April 23, 2009 3:11 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 9, 2011 9:20 AM
Points: 7, Visits: 25
Unfortunately, I still can't find a resolution of the problem. Step by step debbuging shows me that the issue is related to the MsgBox function. I tried to add a refence to assembly Microsoft.VisualBasic (Microsoft.VisualBasic.dll), but it doesn't help.
J.



Post #703637
Posted Thursday, April 23, 2009 3:35 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 28, 2009 9:44 AM
Points: 11, Visits: 6
Interesting article. I thought I could put it to some good use. I tried to apply this to a report where I need to check that two sets fo date parameters are in "synch" with each other. The code works, and the pop-up appears, but clicking NO (or in this case cancel) I need it to halt the report & go back to the initial parameters screen. I figgure that I need to ad some code between lines 14 and 15 that will halt the report. How do I do that?

Here is my code:

1 Function CheckParams () as Boolean
2 Dim prompt as String
3 Dim usrResponse As MsgBoxResult
4 prompt = ""
5 usrResponse = MsgBoxResult.No
6 If ((Report.Parameters!FromDate.Value <= Report.Parameters!CDEFromDate.Value) or (Report.Parameters!ToDate.Value <= Report.Parameters!CDEToDate.Value)) Then
7 prompt = "You entered date ranges that are out of synch. Are you sure you want to continue?"
8 End If
9
10 If prompt <> "" Then
11 usrResponse = MsgBox(prompt,4,"Parameter out of scope" )
12 If usrResponse = MsgBoxResult.Yes Then
13 Return TRUE
14 Else
15 Return FALSE
16 End If
17 Else
18 Return TRUE
19 End If
20 End Function
Post #703645
Posted Thursday, April 23, 2009 9:54 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, June 11, 2014 2:54 PM
Points: 41, Visits: 72
sorry guys if it did not work for you. I will have to get back to you guys at a later date after I get a chance to look at it. But the screen shots are from actually running the report, so I know it works.

But glad to see at least one person who could make use of this trick.

Peter.Groman,

As I mentioned in the article, SSRS 2005 really has lots of limitation but it is not that there are no workarounds. You cannot actually halt the report processing, because this validation occurs after you run the report. So here is what you can do...

When user clicks No or Cancel, the give code returns a boolean "False". So based on this value, you can display a message in the report body, inside a textbox or label, asking users to enter the parameters again or whatever message you want.

You will actually be altering the visible/Hidden property of your entire table or matrix or whatever controls you have in your report to hide when that parameter value is false and in that case you will show your textbox or label with message and hide this message when True.

This should solve your problem. Let me know if this was not clear.

- Prasanna


§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§

always Happy, always Prasanna
Post #703733
Posted Friday, April 24, 2009 4:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Today @ 1:26 PM
Points: 4, Visits: 90
This sample doesn't work.

The MsgBox function cause report process failed

An error occurred during local processing IsValidNum
Post #704348
Posted Saturday, April 25, 2009 4:37 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 9, 2014 6:51 AM
Points: 4, Visits: 124
Hi Prassanna,

Thanks for the post. It is not working as desired way. I expect the report to stop running when the user clicks on cancle button. Specificaly I want the call to db should not happen when the user hits cancle button.

Using the hidden function we can be smart enough to hide data from user, but internally the db call should also be seized. Until the user selects the expected parameter, the report should not process (the call to db should nt happen).
Post #704417
« Prev Topic | Next Topic »

Add to briefcase 1234»»»

Permissions Expand / Collapse