SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Displaying a Pop-up message in SSRS 2005


Displaying a Pop-up message in SSRS 2005

Author
Message
Prasanna, MCTS, MCPD
Prasanna, MCTS, MCPD
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 Visits: 72
Comments posted to this topic are about the item Displaying a Pop-up message in SSRS 2005

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

always Happy, always Prasanna :-)
Samir-404002
Samir-404002
Valued Member
Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)

Group: General Forum Members
Points: 69 Visits: 65
Does the pop-up message (not the text box) works when the report is deployed on the Reporting Server?
Jirka
Jirka
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 27
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



Samir-404002
Samir-404002
Valued Member
Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)Valued Member (69 reputation)

Group: General Forum Members
Points: 69 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.
SanjayAttray
SanjayAttray
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5793 Visits: 1619
Just tried but failed. Throws some invalid error - rsReportParameterProcessingError. Don't know what the heck is that.
'm not a .Net developer.

SQL DBA.
Jirka
Jirka
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 27
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.



Peter.Groman
Peter.Groman
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 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
Prasanna, MCTS, MCPD
Prasanna, MCTS, MCPD
SSC-Enthusiastic
SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)SSC-Enthusiastic (163 reputation)

Group: General Forum Members
Points: 163 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 :-)
qiyuef
qiyuef
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 Visits: 103
This sample doesn't work.

The MsgBox function cause report process failed

An error occurred during local processing IsValidNum
prasant.nanda
prasant.nanda
SSC Journeyman
SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)SSC Journeyman (88 reputation)

Group: General Forum Members
Points: 88 Visits: 143
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).
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search