|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, March 13, 2011 7:12 PM
Points: 40,
Visits: 61
|
|
|
|
|
|
SSC 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?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 09, 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
|
|
|
|
|
SSC 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.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, March 15, 2013 2:43 PM
Points: 3,924,
Visits: 1,554
|
|
Just tried but failed. Throws some invalid error - rsReportParameterProcessingError. Don't know what the heck is that. 'm not a .Net developer.
SQL DBA.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, February 09, 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.
|
|
|
|
|
Grasshopper
      
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
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, March 13, 2011 7:12 PM
Points: 40,
Visits: 61
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:04 PM
Points: 3,
Visits: 66
|
|
This sample doesn't work.
The MsgBox function cause report process failed
An error occurred during local processing IsValidNum
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 3:51 AM
Points: 4,
Visits: 100
|
|
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).
|
|
|
|