Reporting Services 2008 - Anonymous Access

Hello,
In SSRS 2005 I was able to grant anonymous access to my reports by changing the authentication mode for the Reporting Services virtual directory in IIS to Anonymous and then adding the 'account used for anonymous access' to the permissions on the appropriate Reporting Services directories (in report manager).
Now with SSRS 2008 there are no virtual directories in IIS.
I tried to follow the instructions given:
http://technet.microsoft.com/en-us/library/cc281310.aspx (Authentication Types in Reporting Services)
Which instructed me to use the custom AuthenticationType, and following the instructions here:
http://technet.microsoft.com/en-us/library/cc281383.aspx (How to: Configure Custom or Forms Authentication in Reporting Services)
which just got me an error:
The Authentication Extension threw an unexpected exception or returned a value that is not valid: . (rsAuthenticationExtensionError) Get Online Help
For more information about this error navigate to the report server on the local server machine, or enable remote errors
Any ideas on how to set up anonymous access to SSRS2008?
Thanks for any time and help!
-Tim

JC,
I check the solution on net and get following:
First create a class called ReportServerCredentials that implements the IReportServerCredentials interface.  You will need to import System.Net and Microsoft.Reporting.WebForms to this class.  Overload the New and GetFormsCredentials methods and the NetworkCredentials and ImpersonationUser properties.  Here's a class that I use:
Imports Microsoft.VisualBasic
Imports Microsoft.Reporting.WebForms
Imports System.Net
Public Class ReportServerCredentials
    Implements IReportServerCredentials
    Private _userName As String
    Private _password As String
    Private _domain As String
    Public Sub New(ByVal userName As String, ByVal password As String, ByVal domain As String)
        _userName = userName
        _password = password
        _domain = domain
    End Sub
    Public ReadOnly Property ImpersonationUser() As System.Security.Principal.WindowsIdentity Implements Microsoft.Reporting.WebForms.IReportServerCredentials.ImpersonationUser
        Get
            Return Nothing
        End Get
    End Property
    Public ReadOnly Property NetworkCredentials() As ICredentials Implements Microsoft.Reporting.WebForms.IReportServerCredentials.NetworkCredentials
        Get
            Return New NetworkCredential(_userName, _password, _domain)
        End Get
    End Property
    Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie, ByRef userName As String, ByRef password As String, ByRef authority As String) As Boolean Implements Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentials
        userName = _userName
        password = _password
        authority = _domain
        Return Nothing
    End Function
End Class
Next, in the OnLoad of your page with the ReportViewer control, create a new instance of your ReportServerCredentials (I use values stored in AppSettings).  Then assign your object to the ReportViewer control's ServerReport.ReportServerCredentials property. 
Dim cred As New ReportServerCredentials(ConfigurationManager.AppSettings("MyStoredUser"),_
    ConfigurationManager.AppSettings("MyStoredPassword"), _
    ConfigurationManager.AppSettings("MyStoredDomain"))
    MyReportViewerControl.ServerReport.ReportServerCredentials = cred
I try it but get following error
Compiler Error Message: BC30002: Type 'IReportServerCredentials' is not defined.
Do you think it is a possible way for Reporting Service 2008? if yes, what lead to the error? thanks in advance.

Similar Messages

  • Report Builder 1.0 for SQL Server Reporting Services 2008 R2

    We are trying to implement Ad-Hoc Reporting using SSRS 2008 R2.
    First of all, it is very unhelpful that all SSRS books are for either 2008 or 2012, even though SSRS has major changes in 2008 R2 compared to 2008.
    Our instructional materials indicate that we should build Report Models to abstract out our databases into terms familiar to our business users.
    The problem we are having is the difference in functionality between Report Builder 1.0 and Report Builder 3.0. Report Builder 3.0 is touted as having the modern, ribbon based interface that is supposed to make end-users feel more comfortable.  However,
    all the documentation says that end users are supposed to use Report Builder 1.0 for Ad-Hoc Reporting.  And, it seems, that the reports generated by Report Builder 1.0 are not round-trip compatible with all the other reporting tools for SSRS 2008 R2.
    The documentation we have illustrates that Report Builder 1.0 is nice for Ad-Hoc reporting, because is based on connecting directly to Report Models, and the end users can directly drag-and-drop entities and fields into their reports.
    When we try working with Report Builder 3.0, it seems we must first connect to the Report Model as a Data Source and then build a Dataset query on the Report Model.  Only then are some entity attributes available to be dropped into the report. 
    If the user decides another source column is needed, they have to go back, edit the query, save the query, and then drag the column from the Dataset to the report.  This does not seem end user friendly at all!
    We are also concerned that if we train our users on the seemingly soon-to-be-obsolete Report Builder 1.0, and get them used to having direct Report Model access, that at some point we will have to move them to the Dataset-interrupted approach of Report Builder
    2+.  Highlighting this perception of impending obsolescence of Report Builder 1.0 is that in our shop that is starting with SSRS 2008 R2, we cannot figure out how to get a copy of Report Builder 1.0 in the first place.
    We just don't see our end users being savvy enough to handle the steps involved with creating Datasets on top of Report Model Data Sources.  So we would have to build the Datasets for them.  But in that case, what point is there in creating any
    Report Models in the first place if DBAs are the ones to make Datasets?
    As such, it is hard to envision a forward-looking SSRS implementation that has the end user ease-of-use Ad-Hoc reporting that the SSRS 2008 documentation presents.
    What is it that Microsoft actually wants/expects SSRS implementers to do?
    Dan Jameson
    Manager SQL Server DBA
    CureSearch for Children's Cancer
    http://www.CureSearch.org

    Hi Dan,
    Report Builder 1.0
    Simple template-based reports
    Requires report model
    Supports only SQL Server, Oracle, and Analysis Services as data sources
    Supports RDL 2005
    Bundled in SSRS
    Report Builder 2.0 or later
    Full-featured reports as the BIDS Report Designer
    Doesn't require (but supports) report models
    Supports any data source
    Supports RDL 2008
    Available as a separate web download
    In your scenario, you want to use Report Builder 1.0 in SQL Server Reporting Services 2008 R2, I am afraid this cannot achieve. Report Builder 1.0 is available in the box in either SQL 2005 or SQL 2008. It is not available as a separate client apps and is
    only available as a click once application.
    Report Builder 1.0
    Report Builder 3.0
    Thank you for your understanding.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Reporting Services 2008 R2 - SharePoint Integration Mode

    Hi everyone,
    I installed Reporting Services 2008 R2 in my SharePoint(2013) server and configurated the SSRS to run in SharePoint Integrate mode. But, when I run the command Install-SPRSService in SharePoint 2013 Management Shell, I get this error: 
    Does anyone know how resolve it ? I search but I didn't get a solution :(
    Thanks in advance!
    Best Regards!

    SSRS 2008 R2 isn't supported with SharePoint 2013. You'll need a minimum of SSRS 2012 SP1. In addition, SSRS 2008 R2 doesn't include the cmdlet you're looking for because it isn't a Service Application, rather it sat external to SharePoint.
    The support matrix is at http://msdn.microsoft.com/en-us/library/gg492257.aspx.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to set a default date as a parameter in Microsoft Reporting Services 2008 to January 1st

    How can I set a default parameter for date for 01/01/yyyy.

    Hi Giss68,
    If I understand correctly, you want to set the first day of current year as a default value of a parameter in Microsoft Reporting Services 2008 report.
    If in this scenario, we can use the expression below as the default value in the parameter:
    =DateAdd("d",-DatePart(DateInterval.DayOfYear,Today,0,0)+1,Today)
    The following document about DateAdd function is for your reference:
    http://technet.microsoft.com/en-us/library/aa337194(v=sql.100).aspx
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • Expand and Collapse(+/-) option in a Matrix SQL Reporting Services 2008

    Hello All,
    I am having Expand and Collapse(+/-) option in a Matrix SQL Reporting Services 2008. It's not working when it is havnig a Row Group and Column Group.
    Does reporting services has this flexibulity?? It's working fine if it's only have a Row Group an it's not working if it is having Row and a Column Group. Can any one suggest how to work aroung with this.
    any help much appriciated.
    Thanks & Regards,
    Jeevan Dasari.
    Dasari

    Drill-down feature is a basic requirement, it is concluded in Reporting service from SSRS2000 to SSRS2008 R2, To
    your scenario I think the root cause is relevant to your incorrect steps. Please follow the steps below and then give the feedback:
    1.     Right-click the child groups in the
    Row Groups panel which is at the left-bottom of the BIDS, and then select
    Group Properties…
    2.   
    Switch to Visibility tab, and then select
    Hide Radio-button, click the checkbox of Display can be toggled by this report item.
    3.   
    Then select the parent group datafield in the drop-down list.
    4.   
    Click OK.
    Thanks,
    Challen Fu
    Challen Fu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Reporting Services 2008 error

    Good morning all,
    I'm using SQL Server 2008 R2 reporting services, and I'm having a problem with the report server and manager pages.  I've been able to configure everything in the Reporting Services Configuration Manager, and created the ReportServer and ReportServerTempDB
    databases in my SQL Server instance, but when I try to hit either the Web Service URL or the Report Manager URL, I get a 500 error.  The stack trace is below, with the error lines in bold.  If anyone could help, I would really appreciate it. 
    Thanks.
    rshost!rshost!4c4!08/17/2010-09:19:53:: i INFO: Application domain type ReportManager statistics: created: 11, unloaded: 11, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:53:: i INFO: Appdomain:29 ReportManager_MSSQLSERVER_0-23-129265247936138778 started.
    rshost!rshost!4c4!08/17/2010-09:19:53:: i INFO: Application domain type ReportManager statistics: created: 12, unloaded: 12, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:53:: i INFO: Appdomain:30 ReportManager_2-24-129265247938638554 started.
    rshost!rshost!4c4!08/17/2010-09:19:54:: i INFO: Application domain type ReportManager statistics: created: 13, unloaded: 13, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:54:: i INFO: Appdomain:31 ReportManager_3-25-129265247940669622 started.
    rshost!rshost!4c4!08/17/2010-09:19:54:: i INFO: Application domain type ReportManager statistics: created: 14, unloaded: 14, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:54:: i INFO: Appdomain:32 ReportManager_4-26-129265247942700690 started.
    rshost!rshost!4c4!08/17/2010-09:19:54:: i INFO: Application domain type ReportManager statistics: created: 15, unloaded: 15, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:54:: i INFO: Appdomain:33 ReportManager_5-27-129265247944731758 started.
    rshost!rshost!4c4!08/17/2010-09:19:54:: i INFO: Application domain type ReportManager statistics: created: 16, unloaded: 16, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:54:: i INFO: Appdomain:34 ReportManager_6-28-129265247946762826 started.
    rshost!rshost!4c4!08/17/2010-09:19:55:: i INFO: Application domain type ReportManager statistics: created: 17, unloaded: 17, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: i INFO: Appdomain:35 ReportManager_7-29-129265247948793894 started.
    rshost!rshost!4c4!08/17/2010-09:19:55:: i INFO: Application domain type ReportManager statistics: created: 18, unloaded: 18, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: i INFO: Appdomain:36 ReportManager_8-30-129265247950981198 started.
    rshost!rshost!4c4!08/17/2010-09:19:55:: i INFO: Application domain type ReportManager statistics: created: 19, unloaded: 19, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: i INFO: Appdomain:37 ReportManager_9-31-129265247953168502 started.
    rshost!rshost!4c4!08/17/2010-09:19:55:: i INFO: Application domain type ReportManager statistics: created: 20, unloaded: 20, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: i INFO: Appdomain:38 ReportManager_10-32-129265247955355806 started.
    rshost!rshost!4c4!08/17/2010-09:19:55:: i INFO: Application domain type ReportManager statistics: created: 21, unloaded: 21, failed: 0, timed out: 0.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: i INFO: Appdomain:39 ReportManager_11-33-129265247957386874 started.
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: e ERROR: AppDomain ReportManager_11 failed to start. Error: The configuration system has already been initialized.
    library!DefaultDomain!4c4!08/17/2010-09:19:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: Failed to create HTTP Runtime, Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException:
    An internal or system error occurred in the HTTP Runtime object for application domain ReportManager_11.  ---> System.InvalidOperationException: The configuration system has already been initialized.
       at System.Configuration.ConfigurationManager.SetConfigurationSystem(IInternalConfigSystem configSystem, Boolean initComplete)
       at System.Configuration.Internal.InternalConfigSettingsFactory.System.Configuration.Internal.IInternalConfigSettingsFactory.SetConfigurationSystem(IInternalConfigSystem configSystem, Boolean initComplete)
       at System.Web.Configuration.HttpConfigurationSystem.EnsureInit(IConfigMapPath configMapPath, Boolean listenToFileChanges, Boolean initComplete)
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
       at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.GetAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.CreateObject(String appId, Type type, String virtualPath, String physicalPath, Boolean failIfExists, Boolean throwOnError)
       at ReportingServicesHttpRuntime.RsHttpRuntime.Create(RsAppDomainType type, String vdir, String pdir, Int32& domainId)
       --- End of inner exception stack trace ---;
    appdomainmanager!ReportManager_11-33-129265247957386874!4c4!08/17/2010-09:19:55:: i INFO: Appdomain:39 ReportManager_11-33-129265247957386874 unloading
    appdomainmanager!DefaultDomain!4c4!08/17/2010-09:19:55:: e ERROR: AppDomain:ReportManager_11-33-129265247957386874 failed to unload. Error: System.ArgumentNullException: Value cannot be null.
    Parameter name: WaitCallback
    Server stack trace:
       at System.Threading.ThreadPool.QueueUserWorkItemHelper(WaitCallback callBack, Object state, StackCrawlMark& stackMark, Boolean compressStack)
       at System.Threading.ThreadPool.QueueUserWorkItem(WaitCallback callBack)
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
       at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand()
       at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
       at System.Web.HttpRuntime.ShutdownAppDomain(ApplicationShutdownReason reason, String message)
       at System.Web.HttpRuntime.UnloadAppDomain()
       at Microsoft.ReportingServices.AppDomainManager.RsAppDomainManager.UnloadAspDomain(Boolean memoryRecycle)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.ReportingServices.AppDomainManager.RsAppDomainManager.UnloadAspDomain(Boolean memoryRecycle)
       at Microsoft.ReportingServices.AppDomainManager.RsAppDomainManager.CreateHttpRuntime(RsAppDomainType appDomainType, String vdir, String pdir, Int32& domainId).
    library!DefaultDomain!4c4!08/17/2010-09:19:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerAppDomainManagerException: Failed to create Report Server HTTP Runtime, Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerAppDomainManagerException:
    An error occurred when attempting to start the application domain ReportManager within the Report Server service. ---> Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the
    HTTP Runtime object for application domain ReportManager_11.  ---> System.InvalidOperationException: The configuration system has already been initialized.
       at System.Configuration.ConfigurationManager.SetConfigurationSystem(IInternalConfigSystem configSystem, Boolean initComplete)
       at System.Configuration.Internal.InternalConfigSettingsFactory.System.Configuration.Internal.IInternalConfigSettingsFactory.SetConfigurationSystem(IInternalConfigSystem configSystem, Boolean initComplete)
       at System.Web.Configuration.HttpConfigurationSystem.EnsureInit(IConfigMapPath configMapPath, Boolean listenToFileChanges, Boolean initComplete)
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
       at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.GetAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists, HostingEnvironmentParameters hostingParameters)
       at System.Web.Hosting.ApplicationManager.CreateObject(String appId, Type type, String virtualPath, String physicalPath, Boolean failIfExists, Boolean throwOnError)
       at ReportingServicesHttpRuntime.RsHttpRuntime.Create(RsAppDomainType type, String vdir, String pdir, Int32& domainId)
       --- End of inner exception stack trace ---
       at ReportingServicesHttpRuntime.RsHttpRuntime.Create(RsAppDomainType type, String vdir, String pdir, Int32& domainId)
       at Microsoft.ReportingServices.AppDomainManager.RsAppDomainManager.CreateHttpRuntime(RsAppDomainType appDomainType, String vdir, String pdir, Int32& domainId)
       --- End of inner exception stack trace ---;
    rshost!rshost!4c4!08/17/2010-09:19:55:: e ERROR: Failed to create HttpRuntime 80131500.
    rshost!rshost!4c4!08/17/2010-09:19:55:: e ERROR: Failed to get appdomain 80131500, pipeline=0x00F99350.
    rshost!rshost!4c4!08/17/2010-09:19:55:: e ERROR: Error state. Internal abort for pipeline=0x00F99350 ...

    Hi Chris,
    From the error messages you posted, the error is caused by the Reporting Services is not able to create the HttpRuntime.
    Based on my research, the issue should be caused by the account the Reporting Services is running under does not have sufficient privilege to write files under folder 'RSTempFiles'.
    To verify the cause, please check if there is message that resembles the following error message in the Reporting Services error logs:
    Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerAppDomainManagerException: An error occurred when attempting to start the application domain ReportManager within the Report Server service. --->
    Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportManager_MSSQLSERVER_0. ---> System.Web.HttpException: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\RSTempFiles\'.
    In case we can verify the issue is caused by insufficient privilege to write files to 'RSTempFiles', we can assign the mentioned account (Service Account) the permissions to write files to the folder to solve the issue.
    Generally speacking, giving permission to the service account in the folder per log error in reporting services granted access.
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • Reporting services allow anonymous users to download reports

    Hello.
    I'm implementing some reports in a Virtual machine in Azure  and I would like to share these reports with some users through an URL like this:
    http://myreports.cloudapp.net/ReportServer?/SalesReportl&rs:Command=Render&rs:Format=PDF&Cod=GR0030&Year=2014
    Does anyone knows how to do it?
    Best regards.

    Hello,
    Currently there is no option to Set Anonymous access SQL Azure Reporting services.You need specified User name and password and then preview the report.
    You can one of the following authentication subsystems supported by SSRS: Windows authentication or Forms-based authentication.
    Reference:http://msdn.microsoft.com/en-us/library/gg430130.aspx
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • InternalCatalogException in Reporting Services 2008 - no reports rendering

    Hi all,
    We've had an unexpected outage on two of our reporting services server overnight and we're hoping someone can point us in the right direction.  We have a Windows Server 2008 machine running about 5 instances of reporting services in standalone, non-IIS
    mode.
    Two of these instances have started hitting exceptions when rendering any reports.  I include an excerpt from the log below.
    The first evidence of a problem in the log is an InternalCatalogException, of which I can find many unrelated hits when searching the forums so I don't think this is specific enough to trace.  I do note a reference to "segmentedChunkStore" in the
    text which seems like a better clue.
    I've eliminated the idea of a machine/OS issue due to several instances not affected by this problem.  There is some possibly related info which may help:
    -This machine is a HyperV VM which has been moved between hosts within the last few weeks. In the process, all Report Server databases were backed up and restored at the new site.
    - It uses a Custom Authentication extension authored by us.
    - Within the last few days, users of three RS instances advised that a role permission they had prior to the move (Consume Reports Task) was no longer granted.  I had to re-grant this to the role.  The two
    RS instances now experiencing the InternalCatalogException issue raised an error at the time about not being able to find a group when I granted the task.  I added the group, granted again, and it granted without error so I thought nothing more
    of it.
    - These two RS instances have been working fine since the HyperV host move right up until last night.
    - The machine had several Windows Updates queued up which were installed last night.  Since completion of the updates and subsequent reboot, these two Reporting Services instances now raise this InternalCatalogException error when trying to render any
    reports from Report Manager, Report Server, or previous from Report Viewer.
    At this point, I'm suspecting some sort of data corruption has occurred in the ReportServer databases, initially causing the loss of the Consume Reports permission and, after a reboot, these exeptions. But any suggestions on how to troubleshoot further greatly
    appreciated. Here is the excerpt from the log.
    library!ReportServer_0-1!8d4!09/19/2012-20:55:53:: Call to GetItemTypeAction(/Risk Manager/Dashboard Module/Medsys/IncConseqCountYTD).
    library!ReportServer_0-1!12f0!09/19/2012-20:55:53:: Call to GetItemTypeAction(/Risk Manager/Dashboard Module/Medsys/IncCount13Months).
    library!ReportServer_0-1!f98!09/19/2012-20:55:53:: Call to GetItemTypeAction(/Risk Manager/Dashboard Module/Medsys/my30DayActionList).
    library!ReportServer_0-1!10c0!09/19/2012-20:55:53:: Call to GetItemTypeAction(/Risk Manager/Dashboard Module/Medsys/org30DayStatusPanel).
    library!ReportServer_0-1!830!09/19/2012-20:55:54:: i INFO: RenderForNewSession('/Risk Manager/Dashboard Module/Medsys/org30DayStatusPanel')
    library!ReportServer_0-1!830!09/19/2012-20:55:54:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.,
    segmentedChunkStore;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!830!09/19/2012-20:55:55:: i INFO: Exception InternalCatalogException dumped to: C:\Program Files\Microsoft SQL Server\MSRS10.TESTIMPACRS\Reporting Services\Logfiles flags= ReferencedMemory, AllThreads, SendToWatson
    chunks!ReportServer_0-1!830!09/19/2012-20:55:55:: w WARN: Rolling back shared chunk transaction for snapshot '49663ae9-6692-4ea2-8a5d-210de4729653', Permanent=False.
    library!ReportServer_0-1!830!09/19/2012-20:55:55:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!ff8!09/19/2012-20:55:55:: i INFO: RenderForNewSession('/Risk Manager/Dashboard Module/Medsys/my30DayStatusPanel')
    library!ReportServer_0-1!8d4!09/19/2012-20:55:55:: i INFO: RenderForNewSession('/Risk Manager/Dashboard Module/Medsys/triCountPanel')
    library!ReportServer_0-1!8d4!09/19/2012-20:55:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., segmentedChunkStore;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!ff8!09/19/2012-20:55:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., segmentedChunkStore;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    chunks!ReportServer_0-1!ff8!09/19/2012-20:55:55:: w WARN: Rolling back shared chunk transaction for snapshot '68d6456c-1ed0-46eb-8bec-37b04f94065a', Permanent=False.
    library!ReportServer_0-1!ff8!09/19/2012-20:55:55:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!8d4!09/19/2012-20:55:56:: i INFO: Exception InternalCatalogException dumped to: C:\Program Files\Microsoft SQL Server\MSRS10.TESTIMPACRS\Reporting Services\Logfiles flags= ReferencedMemory, AllThreads, SendToWatson
    chunks!ReportServer_0-1!8d4!09/19/2012-20:55:56:: w WARN: Rolling back shared chunk transaction for snapshot '464d6ec5-f256-4633-97d9-792c700931a0', Permanent=False.
    library!ReportServer_0-1!8d4!09/19/2012-20:55:56:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!b90!09/19/2012-20:55:56:: i INFO: RenderForNewSession('/Risk Manager/Dashboard Module/Medsys/my30DayActionList')
    library!ReportServer_0-1!b90!09/19/2012-20:55:56:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., segmentedChunkStore;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!1598!09/19/2012-20:55:57:: i INFO: RenderForNewSession('/Risk Manager/Dashboard Module/Medsys/IncCount13Months')
    library!ReportServer_0-1!b90!09/19/2012-20:55:57:: i INFO: Exception InternalCatalogException dumped to: C:\Program Files\Microsoft SQL Server\MSRS10.TESTIMPACRS\Reporting Services\Logfiles flags= ReferencedMemory, AllThreads, SendToWatson
    chunks!ReportServer_0-1!b90!09/19/2012-20:55:57:: w WARN: Rolling back shared chunk transaction for snapshot '94bb87a7-bece-454e-b418-78b18b9eacb1', Permanent=False.
    library!ReportServer_0-1!b90!09/19/2012-20:55:57:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!8d4!09/19/2012-20:55:57:: i INFO: RenderForNewSession('/Risk Manager/Dashboard Module/Medsys/IncConseqCountYTD')
    library!ReportServer_0-1!1598!09/19/2012-20:55:57:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., segmentedChunkStore;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!8d4!09/19/2012-20:55:58:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., segmentedChunkStore;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    chunks!ReportServer_0-1!8d4!09/19/2012-20:55:58:: w WARN: Rolling back shared chunk transaction for snapshot 'e254656f-6c22-49e6-b473-5ed986e0a730', Permanent=False.
    library!ReportServer_0-1!8d4!09/19/2012-20:55:58:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!ReportServer_0-1!1598!09/19/2012-20:55:58:: i INFO: Exception InternalCatalogException dumped to: C:\Program Files\Microsoft SQL Server\MSRS10.TESTIMPACRS\Reporting Services\Logfiles flags= ReferencedMemory, AllThreads, SendToWatson
    chunks!ReportServer_0-1!1598!09/19/2012-20:55:58:: w WARN: Rolling back shared chunk transaction for snapshot 'e15cc0b9-c8b1-446a-a3bf-da2ceba6273d', Permanent=False.
    library!ReportServer_0-1!1598!09/19/2012-20:55:58:: w WARN: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
    library!WindowsService_0!14a0!09/19/2012-21:01:07:: i INFO: Call to CleanBatch()
    library!WindowsService_0!14a0!09/19/2012-21:01:13:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams, 0 segments, 0 segment mappings.
    Regards,
    Michael

    There are some more objects that reference the hardcoded temp DB of the ReportingServer:
    - dbo.ExtendedDataSources (VIEW)
    - dbo.ExtendedDataSets (VIEW)
    - dbo.ExtendedCatalog (FUNCTION)
    I've created a TSQL Script which does the job for you. The script below creates a script that can be executed on a renamed ReportingServer DB. 
    Just set appropriate values for the variables @oldTempDB and
    @newTempDB 
    SET NOCOUNT ON
    GO
    IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmp_objects')) DROP TABLE #tmp_objects
    GO
    DECLARE @oldTempDB varchar(150), @newTempDB varchar(150)
    SET @oldTempDB='ReportServer$TempDB'
    SET @newTempDB='MY_ReportServer$TempDB'
    SELECT
    CASE type_desc
    WHEN 'VIEW'
    THEN 'VIEW'
    WHEN 'SQL_STORED_PROCEDURE'
    THEN 'PROC'
    WHEN 'SQL_TRIGGER'
    THEN 'TRIGGER'
    WHEN 'SQL_SCALAR_FUNCTION'
    THEN 'FUNCTION'
    WHEN 'SQL_INLINE_TABLE_VALUED_FUNCTION'
    THEN 'FUNCTION'
    WHEN 'SQL_TABLE_VALUED_FUNCTION'
    THEN 'FUNCTION'
    END AS objectType
    , m.definition AS SQLCommand
    , s.name AS SchemaName
    , o.name as ObjectName
    , s.name + '.' + o.name AS objectFullName
    , 0 AS done
    , 0 AS success
    , NEWID() AS ID
    , LEN(m.definition) AS Length
    INTO #tmp_objects
    FROM sys.objects o
    INNER JOIN sys.all_sql_modules m
    ON m.object_id=o.object_id
    INNER JOIN sys.schemas s
    ON s.schema_id=o.schema_id
    WHERE type_desc IN (
    'VIEW'
    , 'SQL_STORED_PROCEDURE'
    , 'SQL_TRIGGER'
    -- , 'USER_TABLE'
    , 'SQL_SCALAR_FUNCTION'
    , 'SQL_TABLE_VALUED_FUNCTION'
    , 'SQL_INLINE_TABLE_VALUED_FUNCTION'
    AND PATINDEX('%' + @oldTempDB + '%', m.definition)>0
    AND PATINDEX('%' + @newTempDB + '%', m.definition)=0
    PRINT 'BEGIN TRANSACTION'
    PRINT 'SET NUMERIC_ROUNDABORT OFF'
    PRINT 'GO'
    PRINT 'SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON'
    PRINT 'GO'
    DECLARE @SQLDefinition VARCHAR(MAX), @ObjectName VARCHAR(200), @ObjectType VARCHAR(50), @CommandID VARCHAR(50), @ObjectFullName VARCHAR(350), @SchemaName VARCHAR(50), @searchPattern varchar(250), @reverseSearchPattern varchar(250)
    DECLARE @LineBreakPos INT, @Pos INT, @patternCounter INT
    WHILE EXISTS(
    SELECT *
    FROM #tmp_objects
    WHERE done=0
    BEGIN
    SELECT TOP 1
    @CommandID=ID
    FROM #tmp_objects
    WHERE done=0
    ORDER BY objectName
    /*-----------------------create output-----------------------------------------*/
    SELECT
    @SQLDefinition=t.SQLCommand
    , @ObjectName=t.objectName
    , @SchemaName=t.SchemaName
    , @ObjectFullName=t.objectFullName
    , @ObjectType=t.objectType
    FROM #tmp_objects t
    WHERE
    t.ID=@CommandID
    SET @patternCounter=0
    /************replace create by alter and oldTempDB by newTempDB***********/
    WHILE @patternCounter<4
    BEGIN
    IF @patternCounter=0 SET @searchPattern='%CREATE %' + @ObjectType +'% %' + @SchemaName + '.' + @ObjectName + '%'
    IF @patternCounter=1 SET @searchPattern='%CREATE %' + @ObjectType +'% %[' + @SchemaName + '].' + @ObjectName + '%'
    IF @patternCounter=2 SET @searchPattern='%CREATE %' + @ObjectType +'% %[' + @SchemaName + '].[' + @ObjectName + ']%'
    IF @patternCounter=3 SET @searchPattern='%CREATE %' + @ObjectType +'% %' + @SchemaName + '.[' + @ObjectName + ']%'
    SET @reverseSearchPattern=REPLACE(REVERSE(@SearchPattern),'[','[[]')
    SET @SearchPattern=REPLACE(@SearchPattern,'[','[[]')
    IF PATINDEX(@searchPattern, @SQLDefinition)>0
    BEGIN
    SET @patternCounter=99
    SET @SQLDefinition= REPLACE(
    SUBSTRING(
    SUBSTRING(@SQLDefinition,
    1,
    LEN(@SQLDefinition) - PATINDEX(@ReverseSearchPattern, REVERSE(@SQLDefinition))+1
    PATINDEX(@searchPattern, @SQLDefinition),
    LEN(@SQLDefinition)
    'CREATE ',
    'ALTER '
    + SUBSTRING(
    @SQLDefinition, LEN(@SQLDefinition) - PATINDEX(@ReverseSearchPattern, REVERSE(@SQLDefinition))+2
    , LEN(@SQLDefinition)
    SET @SQLDefinition=REPLACE(@SQLDefinition, @oldTempDB, @newTempDB)
    END
    ELSE
    BEGIN
    SET @patternCounter=@patternCounter+1
    END
    END
    IF @patternCounter=99 /*found pattern*/
    BEGIN
    /************END replace create by alter*******/
    PRINT ''
    PRINT ''
    PRINT '/******ALTER ' + @ObjectType + ' ' + @ObjectFullName + '******/'
    PRINT 'PRINT ''******ALTER ' + @ObjectType + ' ' + @ObjectFullName + '*******'''
    PRINT 'GO'
    SET @LineBreakPos=CHARINDEX(CHAR(13)+CHAR(10), LEFT(@SQLDefinition,8000))
    IF @LineBreakPos>0 AND LEN(@SQLDefinition)>=8000
    BEGIN
    SET @Pos=1
    WHILE @LineBreakPos>0
    BEGIN
    PRINT SUBSTRING(@SQLDefinition, @Pos, @LineBreakPos-1)
    SET @Pos=@Pos + @LineBreakPos+1
    SET @LineBreakPos=CHARINDEX(CHAR(13)+CHAR(10), SUBSTRING(@SQLDefinition, @Pos, 8000))
    END
    END
    ELSE
    BEGIN
    PRINT @SQLDefinition
    END
    PRINT ''
    PRINT 'GO'
    PRINT 'IF @@ERROR>0 BEGIN ROLLBACK TRANSACTION ''Errors occured, script abborded'' SET NOEXEC ON END'
    PRINT 'GO'
    /*---------------------------end output----------------------------------------------*/
    END
    UPDATE TG
    SET TG.done=1
    , TG.success=(CASE WHEN @patternCounter=99
    THEN 1
    ELSE 0
    END
    FROM #tmp_objects TG
    WHERE
    TG.ID=@CommandID
    END
    PRINT 'IF @@TRANCOUNT>0 BEGIN COMMIT TRANSACTION PRINT ''Successful'' END '
    PRINT 'GO'
    PRINT 'SET NOEXEC OFF'
    Select *
    FROM #tmp_objects
    WHERE success=0
    DROP TABLE #tmp_objects
    Execute this script in MSSQL Management Studio or in a similar tool and copy the created script from the "Messages" pane. If any object fails a table containing them will appear in the results pane.
    Make sure you check the resulting script first before executing to avoid accidential altering of an object.
    have fun with it! ...and thanks to microsoft for making us an extra loop...
    Claude

  • Use a SQL 2012 database server with Reporting Services 2008?

    Hello, we have a SQL Server 2008 R2 Reporting Services Standard server with the reporting databases running on a SQL Server 2008 Standard database server. I would like to upgrade the database server to SQL Server 2012 before I upgrade the reporting server.
    Can I run SQL Server 2008 R2 Reporting Services against a 2008-version database running on a SQL 2012 database server? Thanks for your help.

     
    Hi Nicole
    Thanks for your posting.
    Are you asking if we can connect from SSRS 2008 r2 to a database sitting on SQL Server 2012.  Am I right?, please ignore me if I misunderstood your question. If that is your question
    then I think you will be able to using BIDS 2008, I have created A database on SQL Server 2012 and I use that database table inside  my SSRS 2008 R2 dataset. I can even think that you can use a database of compatibility level of 2012(110) as well
    Many thanks
    Syed Qazafi Anjum

  • Reporting Services 2008 R2 configuration error: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi, I am using SQL Server 2008 R2 and on one of our dev boxes I am trying to setup ReportServer using ReportingServices Configuration manager. This is was installed longtime back and during installation they created a service account for reporting services.
    When I try to configure the service account I do not get the service account created during the installation in the pull down and if I were to use something different I get this "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
    error.
    Thanks in advance...........
    Ione

    Hi,
    Take a look at this blog - http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx
    I hope it will help.

  • SQL Server Reporting Service 2008 R2 - The request failed with HTTP status 401: Unauthorized.

    I got the error "The request failed with HTTP status 401: Unauthorized." when I call the Reporting Service Web Service.
    The code is very simple:
    // Initialise the reporting service Web Service
    this.RSWebService = new ReportingService2010();
    // Pass windos authentication credentials to Web Service
    this.RSWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;
    // List children
    List<CatalogItem> reports = this.RSWebService.ListChildren(folder, false).ToList();
    The SQL Server is installed on a different machine (say server A) from the Web server (say server B). We are using Windows Server 2003.
    The code work fine for all the scenario below:
    i) Run locally (XP) to call the web service on the sql server
    ii) Provide the Network Credentials with the username, password, and domain when calling the web service
    iii) If the web server and sql server is using same server (i.e. not distributed)
    I'm using windows authentication and impersonation. Any idea?

    Hi Raymond,
    If I understand correctly, the issue only happens in the environment that the web server is different with the SQL Server Reporting Services server. This means the web server is a remote server of the Report Server. Windows Integrated authentication is used
    in this case. When running the web page, the 401 error occurs.
    If so, it is actually a double hop issue. The double-hop problem will usually only be an issue to those of you who write some sort of web-based code (a web application or web service) that uses impersonation.
    To fix the issue, we can configure kerberos authentication for the web application and the SQL Server Reporting Services.
    Below is a great article that has delivered many solutions to fix the issue you met:
    http://odetocode.com/articles/216.aspx
    Additionally, you can read the following article to know more about double-hop:
    http://blogs.technet.com/b/askds/archive/2008/06/13/understanding-kerberos-double-hop.aspx
    http://blogs.msdn.com/b/knowledgecast/archive/2007/01/31/the-double-hop-problem.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT
    Thanks Jin. I believe this is the cause of the problem as well.
    I tried to register the SPN but unfortunately it still doesn't work. I'm not sure whether I'm using the correct SPN name.
    I have 3 reporting server instance on the SQL box. So the Web Service URL is like
    http://Server:80/VirtualDirectoryDev,
    http://Server:80/VirtualDirectoryTest  and
    http://Server:80/VirtualDirectoryStaging .
    What's the SPN I need to register?
    I tried
    Setspn -a http/Server:80/VirtualDirectoryDev domain\account
    and
    Setspn -a http/aerver:80 domain\account.
    But both of them are not working :(

  • No dsn is present in the configuration file in the reporting services 2008

    HI i have found this error in the log file of my reporting services ,
    when i comes to the Configuration file in that
    my DSN path is empty no input code is there in that DSN tags
    <DSN>
    <DSN/>
    it shows the empty tags,
    and my Current Report Server Report Credentials are Windows,Service account credentails
    will it take the problem or what
    We have repair the BIDS setup also still not able to solve my issue.
    once this is  resolved now able to send the emails using subscriptions.
    pls infom abut this , i have sufferd this problem last 20 days.
    Please update the above query with high priority
    TanQ

    Hi Ychinnari,
    According to your description, you found error in log file of reporting services, when you come to rsreportserver.config file, the DSN tag is empty.
    DSN specify the database server that hosts the report server database connection string.  The report server database is created, this value will be encrypted and added to the configuration file. To solve the problem, we need to connect to either an
    existing report server database or create a new one for this instance. For detail information, please refer to the following steps:
    Start the Reporting Services Configuration Manager and connect to the report server instance for which you are creating the database.
    On the Database page, click Change Database.
    We can create a new report server database or select an existing database, then click Next.
    Connect to the instance of the Database Engine that you will use to create and host the report server database.
    Specify properties used to create the database.
    Specify the credentials used by the report server to connect to the report server database.
    Review the information on the Summary page to verify the settings are correct, and then click Next.
    Verify the connection by clicking a URL on the Report Server URL page or Report Manager URL page.
    For detail information about Configure a Report Server Database Connection, please refer to the following document:
    https://msdn.microsoft.com/en-us/library/ms159133.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Reporting Services Indicators Problem Accessing Reportitems

    Hi I have indicator arrows which work fine inside Visual Studio but when I deploy them and view them in a browser they always sit on "Yellow". The arrows use ReportItems!textbox...value as the value. I am using the textbox because I am calculating
    the difference between months and storing this in a textbox. The data is from analysis services so alternative would be MDX to add a field to my dataset (my MDX is very limited).

    Hi darkdusky,
    Based on my understanding, you use ReportItems in indicator value expression to design indicator arrows in BIDS. The indicator arrows work fine in BIDS, however, after you deploy the report to Report Manager, all indicator arrows show as “Yellow” indicator
    arrows.
    In Reporting Service, ReportItems is supported to get values in indicator value expression. Generally, we suppose get same results both in BIDS and Report Manager environment. As we tested in our environment, we use ReportItems to create indicator arrows. 
    Both in BIDS and Report Manager environment, indicator arrows show the same results.  Please refer to screenshots below:
    For yourself troubleshooting, you can create a new column next to the indicator column, fill in indicator value expression in this column. Then check if correct indicator arrows are displayed based on the output value of this column. Please also check if
    the indicator expression and indicator states are correct in Indicator Properties. If possible, please provide some screenshots, such as report presenting results both in BIDS and Report Manager environment, indicator value expression and report design. It
    may help us find out the root cause of your issue. Thank you.
    Best regards,
    Qiuyun Yu

  • Printing directly to printer in Reporting Services 2008 problem

    We have recently installed a new SQL 2008 server.  I have an application that prints an SSRS report (2005) directly to the printer.  If I change the reference to point to the new SQL 2008 server and run the application, the report is printed but the font size is huge and the report doesn't fit on the paper.  The only change I made in the code is the reference, that is it. Any ideas why this is happening?
    Thanks

    I guess I wasn't clear with my current configuration.  I am using the SOAP interface to print the reports directly to the printer.  I have a web reference (ReportServer) pointing to the new server and here is the code I use to print the report:
    public class ReportPrinter
            //ReportingService rs;
            ReportServer.ReportExecutionService rs;      
            private byte[][] m_renderedReport;
            private Graphics.EnumerateMetafileProc m_delegate = null;
            private MemoryStream m_currentPageStream;
            private Metafile m_metafile = null;
            int m_numberOfPages;
            private int m_currentPrintingPage;
            private int m_lastPrintingPage;
            private string _printer = "";
            public ReportPrinter()
                rs = new ReportServer.ReportExecutionService();
                rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                PrintDialog dlgPrint = new PrintDialog();
                dlgPrint.PrinterSettings = new PrinterSettings();
                if (Common.gPrinterToUse == "" ||Common.gPrinterToUse == null)
                    if (dlgPrint.ShowDialog() == DialogResult.OK)
                        _printer = dlgPrint.PrinterSettings.PrinterName;
                        Common.gPrinterToUse = _printer;
                    else
                        return;
                else
                    _printer = Common.gPrinterToUse;
            private byte[][] RenderReport(string reportPath, ParameterValue[] reportParameters)
                // Private variables for rendering
                string deviceInfo = null;
                string format = "IMAGE";
                Byte[] firstPage = null;
                string encoding;
                string mimeType;
                Warning[] warnings = null;
                ParameterValue[] reportHistoryParameters = null;
                string[] streamIDs = null;
                Byte[][] pages = null;
                string extension = null;
                string historyID = null;       
                // Build device info based on the start page
                deviceInfo = String.Format(@"<DeviceInfo><OutputFormat>{0}</OutputFormat></DeviceInfo>", "emf");
                ExecutionInfo execInfo = new ExecutionInfo();
                ExecutionHeader execHeader = new ExecutionHeader();
                rs.ExecutionHeaderValue = execHeader;
                execInfo = rs.LoadReport(reportPath, historyID);
                rs.SetExecutionParameters(reportParameters, "en-us");
                rs.Url = "http://hr-sqlsvr3/reportserver/ReportExecution2005.asmx";
                //Execute the report and get page count.
                try
                    // Renders the first page of the report and returns streamIDs for 
                    // subsequent pages
                    //firstPage = rs.Render(
                    firstPage = rs.Render(format, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
                    // The total number of pages of the report is 1 + the streamIDs         
                    m_numberOfPages = streamIDs.Length + 1;
                    pages = new Byte[m_numberOfPages][];
                    // The first page was already rendered
                    pages[0] = firstPage;
                    for (int pageIndex = 1; pageIndex < m_numberOfPages; pageIndex++)
                        // Build device info based on start page
                        deviceInfo =
                            String.Format(@"<DeviceInfo><OutputFormat>{0}</OutputFormat><StartPage>{1}</StartPage></DeviceInfo>",
                            "emf", pageIndex + 1);
                        pages[pageIndex] = rs.Render(format, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIDs);
                catch (SoapException ex)
                    Console.WriteLine(ex.Detail.InnerXml);
                catch (Exception ex)
                    Console.WriteLine(ex.Message);
                    MessageBox.Show(ex.InnerException +
                        Environment.NewLine + ex.Message +
                        Environment.NewLine + "Number of pages: " + pages.Length.ToString() +
                        Environment.NewLine + "Report Path: " + reportPath, "Error Printing");
                finally
                    Console.WriteLine("Number of pages: {0}", pages.Length);
                return pages;
            internal bool PrintReport(string report, ParameterValue[] reportParameters, bool landscape)
                this.RenderedReport = this.RenderReport(report, reportParameters);
                try
                    // Wait for the report to completely render.
                    if (m_numberOfPages < 1)
                        return false;
                    PrinterSettings printerSettings = new PrinterSettings();
                    printerSettings.MaximumPage = m_numberOfPages;
                    printerSettings.MinimumPage = 1;
                    printerSettings.PrintRange = PrintRange.SomePages;
                    printerSettings.FromPage = 1;
                    printerSettings.ToPage = m_numberOfPages;
                    printerSettings.PrinterName = _printer;
                    PrintDocument pd = new PrintDocument();
                    m_currentPrintingPage = 1;
                    m_lastPrintingPage = m_numberOfPages;
                    pd.PrinterSettings = printerSettings;
                    pd.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0);
                    pd.DefaultPageSettings.Landscape = landscape;
                    // Print report
                    Console.WriteLine("Printing report...");
                    pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
                    pd.Print();
                catch (Exception ex)
                    Console.WriteLine(ex.Message);
                finally
                    // Clean up goes here.
                return true;
            private void pd_PrintPage(object sender, PrintPageEventArgs ev)
                ev.HasMorePages = false;
                if (m_currentPrintingPage <= m_lastPrintingPage && MoveToPage(m_currentPrintingPage))
                    // Draw the page
                    ReportDrawPage(ev.Graphics);
                    // If the next page is less than or equal to the last page, 
                    // print another page.
                    if (++m_currentPrintingPage <= m_lastPrintingPage)
                        ev.HasMorePages = true;
            // Method to draw the current emf memory stream 
            private void ReportDrawPage(Graphics g)
                if (null == m_currentPageStream || 0 == m_currentPageStream.Length || null == m_metafile)
                    return;
                lock (this)
                    // Set the metafile delegate.
                    int width = m_metafile.Width;
                    int height = m_metafile.Height;
                    m_delegate = new Graphics.EnumerateMetafileProc(MetafileCallback);
                    // Draw in the rectangle
                    // Point destPoint = new Point(0, 0);
                    Point[] destPoint = new Point[3];
                    Point point1 = new Point(0, 0);
                    Point point2 = new Point(width, 0);
                    Point point3 = new Point(0, height);
                    destPoint[0] = point1;
                    destPoint[1] = point2;
                    destPoint[2] = point3;
                    g.EnumerateMetafile(m_metafile, destPoint, m_delegate);
                    // Clean up
                    m_delegate = null;
            private bool MoveToPage(Int32 page)
                // Check to make sure that the current page exists in
                // the array list
                if (null == this.RenderedReport[m_currentPrintingPage - 1])
                    return false;
                // Set current page stream equal to the rendered page
                m_currentPageStream = new MemoryStream(this.RenderedReport[m_currentPrintingPage - 1]);
                // Set its postion to start.
                m_currentPageStream.Position = 0;
                // Initialize the metafile
                if (null != m_metafile)
                    m_metafile.Dispose();
                    m_metafile = null;
                // Load the metafile image for this page
                m_metafile = new Metafile((Stream)m_currentPageStream);
                return true;
            private bool MetafileCallback(EmfPlusRecordType recordType,int flags,int dataSize,IntPtr data,PlayRecordCallback callbackData)
                byte[] dataArray = null;
                // Dance around unmanaged code.
                if (data != IntPtr.Zero)
                    // Copy the unmanaged record to a managed byte buffer 
                    // that can be used by PlayRecord.
                    dataArray = new byte[dataSize];
                    Marshal.Copy(data, dataArray, 0, dataSize);
                // play the record.      
                m_metafile.PlayRecord(recordType, flags, dataSize, dataArray);
                return true;
            internal byte[][] RenderedReport
                get
                    return m_renderedReport;
                set
                    m_renderedReport = value;

  • Expression Question for SQL Server Reporting Services 2008 R2

    I am trying to form an expression that will give me the est. hours for a specific project type.  Project Type is a field in the data set as well as est.hrs.  There are no calculations needed.  The hours is listed under the field name"Est.Hours".
     So I've been trying to us an IIF expression.  IIF(Fields!ProjectType.Value=Landscaping, "", Fields!Est.Hours.Value).  It is not working.  It renders "0" and it should render "10".  What am I doing wrong?  

    Hi Data Specialist,
    Per my understanding that you want to use the expression to display the Est.Hours for the ProjectType which value are not  "Landscaping" and if the value is "Landscaping" it will display null value, right?
    I have tested on my SSRS 2008 R2 environment and find the issue can be caused by the expression you are using, I would like to confirm with you if the expression "IIF(Fields!ProjectType.Value=Landscaping, "", Fields!Est.Hours.Value)"
    is what you are currently using.
    As Patrick Hurst mentioned that we need do modify the wrap Landscaping in double quotes: "Landscaping" and also the fields name "Est.Hours" also can cause the problem, please try to remove the ".", rename the
    field like"EstHours", So finally the expression is as below:
    =IIF(Fields!ProjectType.Value="Landscaping", "", Fields!EstHours.Value)
    If your problem still exists, please try to provide details information below to help us more effective to provide an solution:
    If you got some error message, please provide them to us.
    Please try to provide the snapshot of the report structure and the sample data of the table
    Any problem, please feel free to ask.
    Regards
    Vicky Liu

Maybe you are looking for