Home » SQL Server

Display message box in SSRS 2008 R2 report

I'm trying to figure out how to display a message box in a ssrs 2008 r2 report. I have custome code that validates a couple of parameters, and I want to display an error message if a user enters an incorrect parameter. I included 'system.windows.forms' as a reference in my report, and tried to use 'system.windows.forms.messagebox.show(errormsg) but I keep getting an error. I created a hidden parameter that references the custom code.

Any help would be greatly appreciated.

Thanks in advance.



2 Answers Found


Answer 1

I'm trying to figure out how to display a message box in a ssrs 2008 r2 report. I have custome code that validates a couple of parameters, and I want to display an error message if a user enters an incorrect parameter. I included 'system.windows.forms' as a reference in my report, and tried to use 'system.windows.forms.messagebox.show(errormsg) but I keep getting an error. I created a hidden parameter that references the custom code.

Any help would be greatly appreciated.

Thanks in advance.



Answer 2

Hi Dan,

In the current reporting services, there is no process that i am aware of to display message box. The "system.windows.forms" code is used in windows form while report manager/report server works under web forms, so it does not work. To work around this situation, the common way is to display a message on the top of the report, follow these steps:

1. Add a TextBox at the top of the report, and type the message. Then, write an expression to control its visibilty so that the message is displayed if the user enters an incorrect parameter, vice versa.

2. Drag a Rectangle control from the toolbox onto the report body, put the report items except the newly added textbox in the step1 into it, then write an expression to control its visibilty so that the Rectangle shows if the users enters a correct parameter, vice versa.




I'm trying to figure out how to display a message box in a ssrs 2008 r2 report. I have custome code that validates a couple of parameters, and I want to display an error message if a user enters an incorrect parameter. I included 'system.windows.forms' as a reference in my report, and tried to use 'system.windows.forms.messagebox.show(errormsg) but I keep getting an error. I created a hidden parameter that references the custom code.

Any help would be greatly appreciated.

Thanks in advance.




I've tried everything I can think of, but setting the Custom Property "Collected Tooltip" for a pie chart where there is data that will be "collected" into an "Other" slice doesn't appear to work.  I am using SQL Server 2008 and SQL Server 2008 R2, and neither one seems to display the collected tooltip.   I have no difficulty getting a tooltip to appear for all the other slices in the pie, using the series tooltip property.    I've searched this forum as well as Google, and the only things I managed to find with any reference was one page that shows you where all those custom attributes are and how to use them.    Is there a bug here, or am I doing something wrong?



We are seeing an issue where certain graphs and guages are not being displayed within a report rendered in the report viewer control after we upgraded from SSRS 2008 to SSRS 2008R2.  You can see the graphs and guages render and then disappear from the screen when two other graphs are rendered.  When I export the report to Excel or PDF then all of the graphs and guages are rendered properly.

There are a total of 3 graphs and 2 guages on the report - when it completes the rendering process, you can only see two of the graphs displayed in the report viewer control - as I said before, you can see all 3 graphs and 2 guages when exporting to Excel or PDF.  Using Internet Explorer v8.  This problem manifest itself right after the upgrade.

Has anyone seen a similar issue? 


I’ve searched on the web and haven’t found a solution yet that would work with the report I’m creating.

Here is the structure of my report:

 Group 1 
 FieldToShow (First("Field 1", Group 2)) 
 Code.myVar.setValue(First("Field 1", Group 2)) 
  Group 2 
  Field 1Field 2  
  Field 3Field 4 
  Field 5Field 6 
  (here is a PAGEBREAK) 

There are Pagebreaks after the first group and after the second group. Each group is about 3-10 pages big (every “group 1” starts from page 1). I need to display a Field from the Dataset in the header on every page except the first one, since that one has a different header.

So far I’ve tried 3 different approaches. I always included the source where I first found them:

Creating a textbox (FieldToShow) that has the required information in it and displaying its value in the header (with: ReportItems!FieldToShow.Value) didn’t work. When I put the field inside the Tablix, I would get the information only on the first and last page, since the subreports are longer than 1 page.



On the second approach I created an internal parameter that would have the information needed which I then used in the FieldToShow textbox, with the same results as on the first try.



So I created a function, as is suggested in the third solution I found. The Value of “MyVar” is set everytime the second group iterates (Code.myVar.setValue(First("Field 1", Group 2))). And on every second Page of the several group I display this Value in the Header. This actually works quite well for all but the last page of each group. There it displays the data of the next person already.

E.g. Page 1-9 have the headers of person 1, page 10 has the header of person 2.

       Page 1-7 of the 2<sup>nd</sup> set have the headers of person 2, page 8 has the header of person 3.




I slightly changed the Code from that website as follows:

Public Shared Dim MyVar as String

Public Function SetMyVar (var as String) as String

MyVar = var

End Function



Is there any way to get it to display it properly on the last page too or any other workaround that I could use to make this work properly?


I am facing an issue after my reporting services was upgraded to SSRS2008 R2. There was a report which had a table and one of the cells had a subreport. That subreport had chart whose visibility is toggled by another text box in the table. When i had R1 this report worked correctly with all the graphs getting displayed correctly. But after the R2 upgrade, i see that only one instance of the subreport chart is displayed at a time. All other graphs are shown blank. Also i observed that sometimes a wrong instance of a subreport chart is in the incorrect place (some other cell). I read a post about adding a 'rc:ImageConsolidation=false' property in the url. But i dont know how to use in the code. Another important point is that i dont see this issue when the report gets rendered in report server or report manager. I am using report viewer 9.0.21022.8.

We have some SSRS 2008 reports which have a few issues in SSRS 2008 R2:

- Page Numbering: Our reports use [PageNumber] of [TotalPages] however, in R2 [Total Pages] only relates to a particular section.  Do we really need to update every single report in design mode to use [OverallTotalPages]?  Is there a workaround?

- Report Rendering: Each page of a report is only rendered when each new page of the report is requested.  How do we prevent this is R2?

- Missing Data: If we run a report that should have 50 pages of data, not all pages are shown when viewing the report.  For example, only 2 pages might show.  However, if we export to PDF the whole 50 pages are exported.  Does anyone know why this is happening?

Looking for patches, workarounds, etc.  Hoping that we don't need to upgrade desktops to R2 and edit hundreds of reports to fix these issues.




I have created a report model in 2008 R2. Now, when I am trying to create a report from the report model, I having trouble in sorting the parameter value in multiselect dropdown list.

I have tried setting Attribute Property Sort Direction as Descending , but it always comes up as Ascending.

Any suggestion would be highly appreciated.



Hi again,
has anybody a version comparison list (feature list) about SQL 2008 R2 Reporting Services and SQL 2008 R2 Express Reporting Services?
I realized only two differences:
1. There is no Report Designer in the Express-Edition
2. You can' t use shared DataSets in the Express-Edition
Best Regards


just got the system up and running. however when I try to log in http://servername/reports on other machine of the same domain, I keep getting prompt for name and password.

I can login on the local machine..

Please help, I need to allow guest to view reports..




I'm having trouble finding detailed information on the changes between SSRS 2008 and SSRS 2008 R2.

Several of my clients use SSRS 2008 with both default authentication and custom authentication. All of the clients also use report builder 1.0. I'm trying to determine if there is any benefit in upgrading to SSRS 2008 R2.






Is there is any difference in performance wise in between these two versions.

i have deployed a report in both the environments. The report is very quick in SSRS 2008 than SSRS 2008 R2.

when we are going to new version (Updated version) performance should be increase. but SSRS 2008 R2 is very slow in executing the report. did i miss any config setting while installing SSRS 2008 R2.

Pls advice me, your help will be appreciated.


Rajesh Peethala



I set up SQL Server 2008 R2 along with SSRS on a Windows 2008 server--let's call it "SQLDB"--and all's working fine.  I'm able to upload reports that are pulling data from the SQLDB databases.  There is no problem.

However, the operations dept. now tells me that a server with SQL Server installed absolutely will not be made available to the users and so I will need a separate SSRS 2008 R2 server (named "SQLRS") that pulls data from SQLDB databases.  Basically, I need to stop using SSRS on SQLDB and start using SSRS on SQLRS.  Makes sense to me, although I've never done this.

I'm confused about what services and components of SQL Server 2008 R2 need to be installed on which server(s).  Could somebody please point me to a page that explains it thoroughly or, if it's fairly simple, explain it for me here? 

For instance, "SQLDB" has SSAS, SSIS, database engine, SQL Browser, Management Tools, and SQL Agent installed. 

On "SQLRS", I installed SSRS, database engine, SQL Agent, SQL Browser, Management Tools, and SQL Agent.  Was it necessary to install the database engine, considering the data to be pulled is on "SQLDB"?  I read that the Agent is only required for subscriptions, but what about SQL Browser?  Is it only required on servers that are running multiple instances of SQL Server?

Thank you for any help you can provide.

I have just started with 2008 R2 in a development environment.  My main concern is the Report Descriptions are truncated.  Is there a way to show the reports in a format similar to SSRS 2008? 

I upgraded our enterprise sql server 2008 to sql server 2008 r2 last weekend.  Along with this i installed the report builder 3.0 on the servers as well and the updated ssrs add in for sharepoint.  The upgrade went fine, no errors that i could find.  The problem is now when i go to a library that has the report builder content type enabled and click report builder report under new it does not load report builder 3.0.

I updated the custom report builder url in central administration from /_vti_bin/ReportBuilder/ReportBuilder_2_0_0_0.application to /_vti_bin/ReportBuilder/ReportBuilder_3_0_0_0.application

however when i do click the new report builder report it kicks me over to http://company.com/ReportServer_MossEnt  which itemizes out each individual sharepoint site in the farm.

Is the integration of ssrs 2008 r2, sharepoint 2007 and report builder 3.0 work?  did i install the wrong version of the report builder add in?  The above is the only problem i am having now.

all servers are server 2008, 64 bit and moss 2007 enterprise with sp2 & april 2010 cu


I created a Data Source View for a database which has foreign key constraints defined for its relationships. However, the DSV wizard didn't recognise them and as the naming convention didn't match the three matching options, didn't create the roles for use in reports. This leaves me with the huge task of creating all the roles manually, which is very frustrating as THE RELATIONSHIPS ARE ALL THERE in the database!!

(This may happen in Analysis Services too?)

Am I missing something here or is this familiar to anyone else?







I have provided my setting and environment information below. My goal is to set Report Manager and Report Server URL with SSL connection so all URLs uses HTTPS (Secure connection) all the time. and remove HTTP access .

I applied following settings for this but I am getting errors. With Current Settings that I mensioned below, I am able to login into WebService URL successfully with all links working. For Report Manager URL  I logged in successfully but for some pages I am getting HTTP links instead HTTPS. It shows HTTP links for new datasource link, upload file link, subscription links so it shows blank page

I tried to look for solution and I applied but did not worked. I did some experiment with changing urls using application and manually from RSReportServer.config file but still not succedded.

Steps taken to solve problem:

To force to use HTTPS only, I tried to change SecureConnectionLevel = 0 to  1,2 or 3 but when accessing to Report Manager it gives 401 Authentication error. If I remove http://+:80/ReportServer and tried to visit 2nd URL with HTTPS. The Web Service URL opens successfully. but Report Manager url gives me error 'request failed with HTTP status 401: Unauthorized'  To solve 401: Unauthorized error, I followed this article http://technet.microsoft.com/en-us/library/ms159778.aspx but not solved my error. I tried to set ReportServerUrl also as shown below.



Reporting Service configuratin tool setting

Web Serivice URL -    1st URL) http://+:80/ReportServer   2nd URL) https://rs.test.abc.com:443/ReportServer

Report Manager URL - https://rs.test.abc.com:443

RSReportServer.config file settings     

SecureConnectionLevel = 0

Environment - Distributed deployment

Server1(report_srv) --Windows server 2003R2 64bit, Installed sql server 2008R2 reporting service, configuration tools

Server2 (report_db_srv) --windows server 2003r2 64bit, sql server 2005 for report server database

(Note: I am using domain user. Report Server and User both are in different domain. but everything was working fine on port 80 without SSL with default settings i.e.   http://fully domain name/Reports )




I need to achive a alert functionality in SSRS report. When a particulat text box value is below specified limit , a message box should pop up or a indicator should keep flashing.

Is there a way to setup the SSRS scheduler to trigger a report to be run so that it is generated for and delivered individually to each person on a list of recipients?

For example, there are 1000 salespeople who all need to see their sales to date every Monday morning at 9:00am. The list of salespeople is variable, but can be obtained with a SQL query. Each salesperson needs to see theirs and only their sales so the same Sales report needs to be executed once for each salesperson. The Sales report needs to be scheduled with a single trigger than can be setup and managed in the SSRS scheduler. 

Also, what is the proper terminology amongst the SSRS community for this general type of report? Would this be a "burst" report?



Recently I have upgraded my Reporting Service from SSRS2008 to SSRS2008 R2 , as a result I am seeing lots of performance issue.some of them are following.

1)On selction of filter criteria in report manger the loading panel is appering each time and it is taking lots of time to hit the db and populate other dependent filter criteria dropdowns . Previously it use to take 13 secs now it has increased to 23 secs.

2)After clicking view report option the report rendering also became slow and now the time period is increased by 16 sec compared to previous.

Please advice me if I can disable the loading panel or some way through which I can get the earlier ssrs 2008 performance.

Also it will be help ful if is their any way to disable default Select All in the filter dropdown.

Thanks in advance for your help.








We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports.

It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection.

Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.


<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure