Run SSRS report subscription on demand?

Hi All,
I am aware how we can schedule a report subscription but is it possible to trigger subscriptions on report execution?
It is event based, but I want to trigger a report extract as an attachment to an email whenever the report is executed?
Possible without writing a VB/C# script? Or is there a better way?

I think that there are undocumented T-SQL means of changing the subscription schedule.
If you are comfortable with VB.Net, there are means of doing this using the rs.exe.  I think that I can figure it out, I just haven't had to.  I am more comfortable using code to actually generate the email.  But it won't be fired from a request
for the report.
There is a means of doing this in SSIS.  I speak of one at SQL Saturdays and there is a TechNet article this is similar to my talk: 
http://technet.microsoft.com/en-us/library/ff793463(v=sql.105).aspx .
I'm not always the biggest fan of how Microsoft does things.  But Microsoft builds pretty good tools.  And they are usually pretty close to the mark on providing the functionality that people need 90% of the time.  And then they provide hooks
that one can use to build your own extensions for the other 10 or so percent.  But it requires writing .Net code.
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

Similar Messages

  • Is there a way to affect the URL used when running a report subscription?

    We are using SQL Server 2008 R2.  I am finding out that when running a report subscription to extract a file in csv format, an extra blank line is created at the bottom (i.e., extra line feed), and the mysterious BOM characters also get inserted at
    the beginning.  Both of these "features" are causing problems with a client's import of these files.  Of course, it affects multiple clients.
    I have done some research and have found information on how to edit the rsconfigserver file to render CSV files using ASCII and to not use Excel formatting.  This removes both "features"/problems stated above.
    However, editing the server config file will affect all csv extractions on that report server.  Is there a way to control the URL of a specific report subscription to include these values (so only the reports that need the fix get it)?  For example,
    someone gave this URL as an example of how to add parameters including encoding in the URL.   http://MyReportServer/ReportServer?%2fReport+Folder%2fReportName&rs:Command=Render&rs:Format=CSV&rc:Encoding=ASCII
    Is there a way to have the report subscription run the report using a URL like this so it extracts it without the BOM characters?  I was thinking a data driven subscription would allow me to set the values like this, but these parameters are only pertinent
    AFTER the report is run and only needed for the final rendering.  Not sure how to do this. Maybe it's not possible. If it's not, that's fine.  I just need to write a proposal to our DBA's to talk them into making a couple edits to the server config
    file.
    Has anyone ever worked around this before in SSRS?
    Thank you!!
    Dana

    Hi DanaSSRS,
    According to your description, you want to have some report exported into CSV file with ASCII encoding when running a subscription. Right?
    In Reporting Services, when we run the subscription, it will call the Render Extension as we configured in rsreportserver.config file, we can't set the Render format with ASCII Encoding on subscription level. As you said, the Render Extension we configured
    in the rsreportserver.config will apply to all reports. In this scenario, you only want that extension apply to specific reports. For your requirement, we suggest you add a custom Render Extension in configure file. You just need to copy the CSV Extension
    and add a <OverrideNames/> to override a new name. Then set the <Encoding> in <Configure>. And you can select this custom Extension when creating the subscription. This might be the most effective workaround.
    Reference:
    Customizing Rendering Extension Parameters in RSReportServer.Config
    CSV Device Information Settings
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • User Was Not Found when trying to run SSRS report!

    I'm trying to run SSRS report (Custom Reports) for Dynamics CRM 2011. However, when I try to run the report from the Reporting Manager it errors out "User Was Not Found"!
    Here's the complete error log:'
    An error has occurred during report processing. (rsProcessingAborted)
    Query execution failed for dataset 'DSMain'. (rsErrorExecutingCommand)
    Microsoft.Crm.CrmException: An unexpected error occurred. System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:
    User Was Not Found <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ErrorCode>-2147220969</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType> <d2p1:key>CallStack</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string"> at Microsoft.Crm.ServerLocatorService.GetCrmUserId(Guid organizationId,
    String authenticationInfo) at Microsoft.Crm.Sandbox.SandboxHostSids.IsCallerAllowed(SandboxSdkContext requestContext, String&amp; expectedSidSddlForm, String&amp; callerSidSddlForm) at Microsoft.Crm.Sandbox.SandboxSdkListener.AuthenticateCaller(SandboxCallInfo
    callInfo, SandboxSdkContext requestContext, String operation) at Microsoft.Crm.Sandbox.SandboxSdkListener.Execute(SandboxCallInfo callInfo, SandboxSdkContext requestContext, String operation, Byte[] serializedRequest)</d2p1:value> </KeyValuePairOfstringanyType>
    </ErrorDetails> <Message>User Was Not Found</Message> <Timestamp>2014-05-09T21:37:02.5487525Z</Timestamp> <InnerFault i:nil="true" /> <TraceText i:nil="true" /> </OrganizationServiceFault>
    An unexpected error occurred.
    User Was Not Found

    Hello,
    Can you preview the report in Report Builder or Report Designer?
    Based on the error message, the issue may related to a invalid user account for the report data source credentials.Please verify the user account is valid and has sufficient permission to access CRM data source.
    You can refer to the following blog to troubleshooting CRM custom report rsProcessingAborted error:
    http://blog.simpletrees.com/2013/04/mscrm-and-dreaded-rsprocessingaborted.html
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Getting error while running SSRS report in SharePoint 2010

    Hi,
    I am getting below error while running a SSRS reports in SharePoint. Your help will be appreciated
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
    Timestamp: Wed, 5 Nov 2014 11:58:42 UTC
    Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 503
    Line: 5
    Char: 62123
    Code: 0
    Thanks,
    Manjunath

    Hi,
    According to your post, my understanding is that you get error while running SSRS reports.
    Basically, If the Request Management service is enabled, it manages all incoming requests by evaluating logic rules against the user requests in order to determine what\which action to take and which machine or machines (targets) in the farm should handle
    the request.
    By default the Request time out value for Request Management service are as follows,
    RequestTimeout                    : 00:01:40
    RequestExecutionTimeout       : 01:00:00
    So the error throws from RM service for those reports who take more than 1 minute to generate the report.
    To solve this issue, we can stop the Request Management service.
    Or increase the time out
    value by making use of following PowerShell  script.
    $waUrl = "URLofWEbApp"
    $wa = Get-SPWebApplication $waUrl
    $rmSettings = $wa | Get-SPRequestManagementSettings
    $req=$wa.RequestManagementSettings
    $timeout2= New-TimeSpan -minutes 5
    Sreq.Requesttimeout=$timeout2
    $req.update()
    For more information:
    http://blogs.technet.com/b/sajiths/archive/2014/08/19/ssrs-reports-timed-out-with-39-503-39-error-sharepoint-2013.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to find an SSRS report subscription was executed 3 days back and sent an Email to the requested person or group?

    Hi All,
    I got complain that one of my reports which was subscribed from SSRS Report Manager could not delivered to targeted people 3 days back. 
    I want to to check that Email was sent or not So I wrote below query but I think table  will be over written on each execution of subscription and cannot see the history. I can see only the latest data.
    SELECT A.NAME,B.Description,B.LastStatus,B.LastRunTime 
    FROM [dbo].[Catalog] A
    INNER JOIN [dbo].[Subscriptions] B ON A.ItemID=B.Report_OID
    WHERE TYPE=2 
    AND NAME='REPORT_NAME'
    AND B.LastStatus LIKE '%EMAIL ID%'
    AND B.LastRunTime>Getdate()-1
    ORDER BY B.LastRunTime
    There is another query which says that report was rendered by SUBSCRIPTION and have no track that Email was sent or not.
    --Query to find out how a report was execute 
    SELECT * FROM EXECUTIONLOG3 
    WHERE REQUESTTYPE='SUBSCRIPTION'
    AND ITEMPATH LIKE '%REPORT NAME'
    ORDER BY TIMESTART DESC
    There is any way to track this?
    https://msdn.microsoft.com/en-us/library/ms159110.aspx
    http://blogs.msdn.com/b/deanka/archive/2009/01/13/diagnosing-and-troubleshooting-subscriptions.aspx
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Hi S Kumar Dubey,
    According to your description, you want to find the failed subscription report and resent the report to users again.
    In this scenario, you can run the query below to find the failed subscription.
    use ReportServer
    go
    SELECT C.Name, S.LastRunTime, S.LastStatus, S.Description
    FROM Subscriptions AS S
    LEFT OUTER JOIN [Catalog] AS C
    ON C.ItemID = S.Report_OID
    WHERE LEFT (S.LastStatus, 12) != 'Mail sent to'
    AND LEFT (S.LastStatus, 12) != 'New Subscrip'
    Then you can execute the code with jobstep command below to find the corresponding SQL Agent Jobs for failed subscription, then execute the job to send the email again.
    select 'exec sp_start_job @job_name = ''' + cast(j.name as varchar(40)) + ''''
    from msdb.dbo.sysjobs j
    join msdb.dbo.sysjobsteps js on js.job_id = j.job_id
    join [ReportServer].[dbo].[Subscriptions] s on js.command like '%' + cast(s.subscriptionid as varchar(40)) + '%'
    where s.LastStatus like 'Failure sending mail%';
    Reference:
    SSRS Failed Subscription Notifications
    Re-running SSRS subscription jobs that have failed
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • "object reference not set to an instance of an object" error while running ssrs report locally

    Hi Folks,
    I am a bit new to SSRS.
    I am using ssrs 2012 and trying to use a method from a dll file. I am loaded the assembly file in reference of the report.
    Now I am trying to use a static method from the Dll. e.g. applicationName.classname.MethodName()
    But while running the report I am getting "object reference not set to an instance of an object" error.
    For a note I am trying execute the report locally.
    Any help would be highly appreciable.
    sarat chandra sahoo

    Sorry for late reply Sinaloe..
    I have added a dll file in my report reference. And in a textbox trying to execute this below.
    =Recall.Common.LocalizationEx.Localization.GetString(Parameters!Culture.Value, "RFID", "BICustomerPortal")
    where Getstring() is a static method in the dll.
    I guess some configuration setting I am missing here.
    1. I have copied these dlls in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" and "C:\Windows\Assembly".
    sarat chandra sahoo

  • Problem running SSRS report on SharePoint 2010 - report renders rendomly

    I have an SSRS master report that contains about 30 sub-reports. These reports are deployed to SharePoint 2010 server. Per my understanding these reports run independently of Reporting Server (execute directly from the cube/database).
    It appears that this master report executes for about 10 minutes and then returns a blank page for most requests. Seldom it returns the master report consisting 30 sub-reports. I have checked Report Server logs using the following query and it shows no trace.
    Use ReportServer
    select * from ExecutionLog3 order by TimeStart DESC
    I set SharePoint 2010 logging to the lowest level and reviewed the log for the run-time of the report. This log shows that the report and sub reports are being executed, however it does not provide any significant error information. Follows a sample of what
    SharePoint log contains for single sub-report execution.
    Timestamp Process TID Area Category EventID Level Message Correlation
    04/02/2014 15:43:18.75 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Database 4ohp High Enumerating all sites in SPAdministrationWebApplication.
    04/02/2014 15:43:18.81 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Database 4ohp High Enumerating all sites in SPAdministrationWebApplication.
    04/02/2014 15:43:21.07 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable Potentially excessive number of SPRequest objects (16) currently unreleased on thread 15. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. This object is holding on to a separate native heap.This object will not be automatically disposed. Allocation Id for this object: {04E40041-2CC7-4CA2-8026-0921BFF7F0A8} Stack trace of current allocation: at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) at Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode) at Microsoft.SharePoint.Administration.SPFarm....
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...get_RequestAny() at Microsoft.SharePoint.SPSite.InitUserToken(SPRequest request) at Microsoft.SharePoint.SPSite.SPSiteConstructor(SPFarm farm, Guid applicationId, Guid contentDatabaseId, Guid siteId, Guid siteSubscriptionId, SPUrlZone zone, Uri requestUri, String serverRelativeUrl, Boolean hostHeaderIsSiteName, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(String requestUrl) at Microsoft.ReportingServices.SharePoint.Objects.RSSPImpSite..ctor(String requestUrl) at Microsoft.ReportingServices.SharePoint.Objects.RSSharePointClassFactory.CreateSPSite(String requestUrl) at Microsoft.ReportingServices.SharePoint.ObjectModel.RSSharePointClassFacto...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...ry.CreateSPSite(String requestUrl) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.GetSiteFromExternalPath(String path, Boolean noThrow) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.SetExternalRoot(String path) at Microsoft.ReportingServices.SharePoint.Server.SharePointServiceHelper.SyncToRSCatalog(ExternalItemPath path, Boolean createOnly) at Microsoft.ReportingServices.Library.CatalogItemFactory.InternalGetCatalogItem(CatalogItemContext itemContext, Boolean doSync, Boolean& wasSynched) at Microsoft.ReportingServices.Library.SubreportRetrieval.GetSubreportDataSources(ICatalogItemContext reportContext, String subreportPath, NeedsUpgrade needsUpgradeCallback, ICatalogItemContext& subreportContext, IChunkFactory& compil...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...edDefinitionChunkFactory, DataSourceInfoCollection& dataSources, DataSetInfoCollection& dataSets) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CheckCredentialsOdp(Report report, DataSourceInfoCollection dataSources, DataSetInfoCollection dataSetReferences, ICatalogItemContext reportContext, OnDemandSubReportDataSourcesCallback subReportCallback, RuntimeDataSourceInfoCollection allDataSources, RuntimeDataSetInfoCollection allDataSetReferences, Int32 subReportLevel, Boolean checkIfUsable, ServerDataSourceSettings serverDatasourceSettings, Hashtable subReportNames) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.GetAllDataSources(ICatalogItemContext reportContext, IChunkFactory getCompiledDefinitionFactory, OnDemandSubReportDataSourcesCallback subR...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...eportCallback, DataSourceInfoCollection dataSources, DataSetInfoCollection dataSetReferences, Boolean checkIfUsable, ServerDataSourceSettings serverDatasourceSettings, RuntimeDataSourceInfoCollection& allDataSources, RuntimeDataSetInfoCollection& allDataSetReferences) at Microsoft.ReportingServices.Library.RSService.ProcessingGetAllDataSources(ReportProcessing repProc, CatalogItemContext reportContext, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, DataSetInfoCollection thisReportDataSets, Boolean checkIfUsable, RuntimeDataSourceInfoCollection& runtimeDataSources, RuntimeDataSetInfoCollection& runtimeDataSets) at Microsoft.ReportingServices.Library.RSService.GetAllDataSources(ReportProcessing repProc, BaseReportCatalogItem report, ReportSnapsho...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...t intermediateSnapshot, Boolean checkIfUsable, RuntimeDataSourceInfoCollection& runtimeDataSources, RuntimeDataSetInfoCollection& runtimeDataSets) at Microsoft.ReportingServices.Library.RSService.GetAllDataSources(BaseReportCatalogItem report, Boolean checkIfUsable, Boolean useServiceConnectionForRepublishing, ReportSnapshot& compiledDefinition, RuntimeDataSourceInfoCollection& runtimeDataSources, RuntimeDataSetInfoCollection& runtimeDataSets) at Microsoft.ReportingServices.Library.BaseReportCatalogItem.LoadRuntimeDataSources() at Microsoft.ReportingServices.Library.BaseReportCatalogItem.get_RuntimeDataSources() at Microsoft.ReportingServices.Library.GetDataForExecutionAction._GetDataForExecution(CatalogItemContext reportContext, ClientRequest session, String historyID, Dat...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...aSourcePromptCollection& prompts, ExecutionSettingEnum& execSetting, DateTime& snapshotExecutionDate, ReportSnapshot& snapshotData, Int32& pageCount, Boolean& hasDocMap, PageSettings& reportPageSettings, PaginationMode& paginationMode) at Microsoft.ReportingServices.Library.GetDataForExecutionAction.ExecuteStep(CatalogItemContext reportContext, ClientRequest session, DataSourcePromptCollection& prompts, ExecutionSettingEnum& execSetting, DateTime& executionDateTime, ReportSnapshot& snapshotData, Int32& pageCount, Boolean& hasDocMap, PageSettings& reportPageSettings, PaginationMode& paginationMode) at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save() at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(String Report, String HistoryID, Execu...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...tionInfo2& executionInfo) at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport2(String Report, String HistoryID, ExecutionInfo2& executionInfo) at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) at System.Web.Services.Protocols.WebServi...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...ceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr) at System.Web.Http...
    04/02/2014 15:43:21.07* ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable ...Runtime.ProcessRequest(HttpWorkerRequest wr) at ReportingServicesHttpRuntime.RsHttpRuntime.ProcessRequest(IRsHttpPipeline rsHttpPipeline)
    04/02/2014 15:43:21.10 ReportingServicesService.exe (0x0684) 0x14C0 SharePoint Foundation Performance naqx Monitorable Potentially excessive number of SPRequest objects (16) currently unreleased on thread 15. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. This object is holding on to a separate native heap.This object will not be automatically disposed. Allocation Id for this object: {9D227A96-9050-4123-A663-EECC9CBDA04D} Stack trace of current allocation: at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) at Microsoft.SharePoint.SPRequestManager.GetContextRequest(SPRequestAuthenticationMode authenticationMode) at Microsoft.SharePoint.Administration.SPFarm....
    I have tried running reports on IE 8, IE 9, Chrome and on multiple systems. This random behavior does not change across browsers or machines. Report is rendered for one out of 10 requests (if at all).
    Has someone experienced this problem? I have been spending a lot of time just to see the report output of the master. Unfortunately my SharePoint reports use shared data-sets and it is not possible to run master from Visual Studio 2008 IDE as well. 
    Thanks in advance for your help.
    Palak Mody

    Hi Kenny,
    Thank you for your question.
    From your description, you can to move the parameter pane from right to the top in the SharePoint site, right? I am afraid this cannot be done in SQL Server 2008R2 SSRS reports on SharePoint 2010 integrated mode. And this is a know issue which you can see:http://connect.microsoft.com/SQLServer/feedback/details/545893/allow-ssrs-parameter-panel-to-be-formatted
    Thank you for your understanding.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Running SSRS report locally in separate thread

    We're using ASP.net with .Net 4, developing with Visual Studio 2012.  We use SSRS 2012sp1 with local reports, so exporting the report ourselves instead of using a reportviewer control (and not using the SQL Reporting service).  The reports are executing
    fine when we export the report in the main thread, but if we spawn a worker thread and run a report there we receive the following error when calling Render():
    Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Failed to load expression host assembly. Details: Invalid token
    for impersonation - it cannot be duplicated.
    We only receive this when running a report that uses expressions on a separate thread.  I've tried running the application pool under all the default built-in accounts (NetworkService, etc), and under admin user accounts to no avail.
    This didn't occur with the previous version of our application which used .net 3.5.  From what I've read, its because of a new security model in .net 4.
    I've tried running the application pool under LocalSystem, that does not help.
    We are not loading any custom DLLs in the report.  I think its trying to load the expression DLL that SSRS compiles from expressions on the report.  We don't have any outside DLLs on the report, only basic report expressions.  This works fine
    in-process, it only fails when we try to run it on a separate thread.
    Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Failed to load expression host assembly. Details: Invalid token for impersonation - it cannot be duplicated.
    at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.ProcessLoadingExprHostException(ObjectType assemblyHolderObjectType, Exception e, ProcessingErrorCode errorCode)
    at Microsoft.ReportingServices.RdlExpressions.ReportRuntime.LoadCompiledCode(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, Boolean includeParameters, Boolean parametersOnly, ObjectModelImpl reportObjectModel, ReportRuntimeSetup runtimeSetup)
    at Microsoft.ReportingServices.OnDemandProcessing.Merge.Init(Boolean includeParameters, Boolean parametersOnly)
    at Microsoft.ReportingServices.OnDemandProcessing.Merge.Init(ParameterInfoCollection parameters)
    at Microsoft.ReportingServices.ReportProcessing.Execution.ProcessReportOdp.CreateReportInstance(OnDemandProcessingContext odpContext, OnDemandMetadata odpMetadata, ReportSnapshot reportSnapshot, Merge& odpMerge)
    at Microsoft.ReportingServices.ReportProcessing.Execution.ProcessReportOdp.Execute(OnDemandProcessingContext& odpContext)
    at Microsoft.ReportingServices.ReportProcessing.Execution.RenderReportOdpInitial.ProcessReport(ProcessingErrorContext errorContext, ExecutionLogContext executionLogContext, UserProfileState& userProfileState)
    at Microsoft.ReportingServices.ReportProcessing.Execution.RenderReport.Execute(IRenderingExtension newRenderer)
    at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension newRenderer, DateTime executionTimeStamp, ProcessingContext pc, RenderingContext rc, IChunkFactory yukonCompiledDefinition)
    at Microsoft.Reporting.LocalService.CreateSnapshotAndRender(ReportProcessing repProc, IRenderingExtension renderer, ProcessingContext pc, RenderingContext rc, SubreportCallbackHandler subreportHandler, ParameterInfoCollection parameters, DatasourceCredentialsCollection credentials)
    at Microsoft.Reporting.LocalService.Render(String format, String deviceInfo, String paginationMode, Boolean allowInternalRenderers, IEnumerable dataSources, CreateAndRegisterStream createStreamCallback)
    at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
    --- End of inner exception stack trace ---
    at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings)
    at Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
    at Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
    at Microsoft.Reporting.WebForms.Report.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
    at IxSS.Infolinx.Report.MicrosoftInfolinxReport.ExportReport(String strFileFullyQualifiedPath, String strExportType, String strFilterDesc, Dictionary`2 extraParams, String area)
    at IxSS.Infolinx.Report.MicrosoftInfolinxReport.ExportReport(String strFileFullyQualifiedPath, String strExportType, String strFilterDesc, Dictionary`2 extraParams)

    Was that a joke?
    If not, no, there is no duplicated token to run the report.  I'm guessing it means some sort of security token, but if its something to do with the user running the application pool, changing that user has no effect.  I've enabled and disabled
    asp.net impersonation to no effect as well.

  • Date parameter interchanges while running SSRS reports in CRM 2013 online

    Hi,
    We have a 2 date parameters in a SSRS Report, While running this report a user is getting issue with this date parameter, date changes to month and month changes to date in the first parameter(in screen shot it is 01-dec entered but displays 12-jan) and
    second seems to work fine but here time is also shown.
    As a note: I am not getting the error when I run it.
    Any one has got the same issue, Any suggestion/solution?
    Regards,
    Rekha.J

    If this is happening to only one or a few users then I suspect some issue with the user's machine configuration.  Have the user log in and try it from your machine and see if he or she gets the same experience.  Ensure you have completely cleared
    the user's cache and also try with a different browser like Chrome.
    Regards, Donna

  • Issues using HTTP Connection Manager to run SSRS reports from SSIS

    In my package, I have a HTTP Connection Manager called "ReportServer". And I have two variables called "ReportURL" and "ReportFile". "ReportURL" is the URL for the report. I won't get into the details of this
    URL because I don't think this is the issue. "ReportFile" is the complete path and name of the output file I want to generate from "ReportURL".
    With these things in place, I have a script component that that looks like this.
    Public Sub Main()
    'Connect to http conn mgr
    Dim httpConn As ConnectionManager = Dts.Connections("ReportServer")
    Dim clientConn As HttpClientConnection = New HttpClientConnection(httpConn.AcquireConnection(Nothing))
    'file name with path
    Dim ReportFile As String = Dts.Variables("ReportFile").Value.ToString
    'report url
    Dim ReportURL As String = Dts.Variables("ReportURL").Value.ToString
    clientConn.ServerURL = ReportURL
    'Download PDFReport
    clientConn.DownloadFile(ReportFile, True)
    Dts.TaskResult = ScriptResults.Success
    End Sub
    I don't know too much about the inner workings of the above script. It's from a template I copied from somewhere and it's been working fine.
    But, today all of a sudden, it started a mysterious behavior. Let me see if I can describe it to see if this sounds familiar to anyone.
    For some reason, a run of this package failed at time T1, running with a certain value of "ReportURL" and "ReportFile". Now everytime I try to fun the package with the same "ReportURL" and "ReportFile", it fails because
    it tries to write out two files with the same name, "ReportFile", one from the current one and another from the failed one at time T1. It looks like somehow, the connection is still open from the failed one in time T1 and it won't go away.... does
    this sound like anything? Can you understand the problem I am describing?

    May it be that this post is NOT SSIS related?
    Arthur My Blog

  • SSIS package to do SSRS email subscriptions

    I know how silly the title is, but anyways I am going to ask this question...
    I have a Main report and a sub-report in SSRS, I need to send out an email every time a new entry is generated/added to the database...
    And I need to send the sub-report link in an email so the user could see the data for the new entry...
    Need to automate this process by building an SSIS package that works exactly like SSRS email Subscriptions...
    Thanks in advance...
    Dhananjay Rele

    Hi Dhananjay,
    As Arthur said, in the SSIS package, you can use a Send Mail Task to send emails with the URL of the sub-report in the message source. Then, create a job to run the SSIS Package, and create a after insert trigger on the target database table to start the
    job once a new records is inserted into the target table. The script to create the trigger is like:
    CREATE TRIGGER TriggerName ON TableName
    AFTER INSERT
    AS
    EXEC msdb..sp_start_job
    @job_name=’JobName’;
    Go
    In addition, if you would like, you can run a SSRS report subscription to export a report to a shared folder, and then attach the exported file as the attachment of the mail when configuring the Send Mail Task.
    Regards,
    Mike Yin
    TechNet Community Support

  • Custom rendering extensions not working in SSRS Report Designer (rsreportdesigner.config)

    My custom rendering extension is working in Report Builder (in RSReportServer.config), but not in Report Designer (in RSReportDesigner.config):  instead of adding a "TXT" export option, it's just adding a duplicate "CSV" option.
    SUMMARY: 
    Is there a way to get these features working, with Report Designer?
    DETAILS:
    We are running SSRS (Reporting Services) under SQL Server 2008 R2.
    Here's my rendering section:
        <Render>
          <Extension Name="XML" Type="Microsoft.ReportingServices.Rendering.DataRenderer.XmlDataReport,Microsoft.ReportingServices.DataRendering" />
          <Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering" />
          <!-- TXT extension with help from:  http://social.msdn.microsoft.com/Forums/sqlserver/en-US/d79845a8-17fb-4ec6-b121-2c40cf466d73/how-do-i-add-a-pipe-delimited-option-in-ssrs-2008-report-manager?forum=sqlreportingservices -->
          <Extension Name="TXT" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
            <OverrideNames>
                <Name Language="en-US">TXT(ASCII,NoColHds)</Name>
            </OverrideNames>
            <Configuration>
                 <DeviceInfo>
                     <FileExtension>txt</FileExtension>
                    <FieldDelimiter>,</FieldDelimiter>
                    <Encoding>ASCII</Encoding>
                    <NoHeader>true</NoHeader>
                </DeviceInfo>
            </Configuration>
          </Extension>
          <Extension Name="IMAGE" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering" />
          <Extension Name="PDF" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer,Microsoft.ReportingServices.ImageRendering" />
          <Extension Name="HTML4.0" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.Html40RenderingExtension,Microsoft.ReportingServices.HtmlRendering" Visible="false" />
          <Extension Name="MHTML" Type="Microsoft.ReportingServices.Rendering.HtmlRenderer.MHtmlRenderingExtension,Microsoft.ReportingServices.HtmlRendering" />
          <Extension Name="RPL" Type="Microsoft.ReportingServices.Rendering.RPLRendering.RPLRenderer,Microsoft.ReportingServices.RPLRendering" Visible="false" />
          <Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" />
          <Extension Name="WORD" Type="Microsoft.ReportingServices.Rendering.WordRenderer.WordDocumentRenderer,Microsoft.ReportingServices.WordRendering" />
        </Render>
    When I add the above "TXT" section to RSReportServer.config, then Report Builder (and production) both show an export option "TXT(ASCII,NoColHds)". 
    But when I add this "TXT" section to RSReportDesigner.config, and then (in Report Designer / BIDS) attempt to export from a "Preview" of the report, the export drop-down does not show a "CSV" option followed by a "TXT"
    option, but instead shows the "CSV" option twice.
    This simply limits testing of the export option, to Report Builder... or requires any reports be published from Report Designer before they can be tested with
    this export option.
    (FYI, why this export option:  compliance in our industry requires sending data to government agencies, in text files, with fixed-length columns, and ASCII encoding.  Also, we're attempting to give the production of these files to the *users* managing
    communication with those agencies... so we're putting them into SSRS.
    I worked around the fixed length columns (and no delimiters -- no commas), by writing a version of the report where all string columns are padded, and all columns are concatenated, to form ONE LONG COLUMN... but Reporting Services' CSV export format produces
    a Unicode file (UTF-8, which the agency rejected, because it had a leading "", or "EF BB BF" in hex), whereas the agency requires an ASCII file.)

    Hi Doug_atMidway,
    According to your description, you want to enable your custom render extension. Right?
    In Reporting Services, if you want to deploy the custom extension, you just need to add the extension into rsreportserver.config file.  The
    RSReportDesigner.config file stores settings about the rendering extensions available to Report Designer. Since you still use the csv rendering extension in your assembly, we don't need to do any modification in rsreportdesigner.config file. Pleaes
    refer to the links below:
    Thanks for attempting to help, Simon.  
    As my question states, I've *already done* both the above:  changed (1) rsreportserver.config and (2) rsreportdesigner.config.  I added the same code, shown above, to both files.  I did that so I could see the new "txt" extension
    both (1) when exporting in production and Report Builder, and (2) when exporting in Report Designer's "preview".  
    The change in (2) is not working:  I do not see the "TXT" extension in Report Designer, when I try to export from a preview.  Instead, Report Designer shows the CSV extension repeated.
    Thanks for the docs.  I consulted them (well, I consulted the EQUIVALENT pages, for SQL Server 2008 R2), when creating my block of code above.
    Do you see anything to correct, in my code?
    Are the features I'm using actually working, with rsreportdesigner.config?
    Thanks again, 
    -- Doug

  • Hyperlink from SSRS Report

    Hi , I run ssrs reports form my VB application the hyperlink Does not open. When I run the same report from the server the hypelink opens normaly. Any Suggestion?
    Thanks
    Luis

    Hi Luiso,
    Do you mean the hyperlinks generated by the “Go to URL” or “Go to Report” action in the report? Do you use ReportViewer control in your VB .NET application? Are there any parameters passed from the custom application to the hyperlink URL? Could you post
    the URL of the hyperlink?
    Here, I suggest that you delete the report from the report server, and re-deploy it. If it doesn’t work, please post more information for further analysis.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • How to setup SSRS reports to run automatically

    Hi All,
    I am completely new to SSRS.  I am currently using Visual Studio Premium 2013 version to develop my SSRS reports.
    I've been reading many posts in regard to setting up SSRS reports to run automatically.
    I can see on some answered posts that I can use subscription feature of SSRS by going to my report manager-->Select
    your report--> goto properties -->Subscription tab.
    My first dumb question as a newbie to SSRS is; how and where do I locate my report manager.
    Thank you all for your help.

    My first dumb question as a newbie to SSRS is; how and
    where do I locate my report manager.
    Hello,
    The "Report Manager" is a web interface to manage & access SSRS reports; see
    Report Manager (SSRS Native Mode) and
    Tutorial: How to Locate and Start Reporting Services Tools (SSRS)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to run the same SSRS report multiple times, each time with a different parameter value?

    Hi,
    I have an SSRS report that produces a list of invoices for a single supplier (so supplier is a parameter specified at runtime). The report is based on a stored procedure in SQL. I would like to make things easier and instead of going through all suppliers
    one by one, I want to have a single action, which produces separate reports, per supplier, for all suppliers that have an outstanding invoice (so not all suppliers on the system as a whole but all suppliers that are within the result set of the stored procedure).
    I assume this would mean first executing the stored procedure to find all suppliers that have invoices at the time. And then running the report multiple times, once for each supplier, where the supplier value is used as the parameter every time. ideally
    this would open separate webpages with a single report per page. (I am creating a button in another software, which is simply launching iexplore.exe and passing a
    fixed SSRS report URL).
    What would be required? I have SQL 2012 and I am building this in Report Builder 3.0.
    Thank you!
    Dimitar
    P.S. What about still running ONE report, but every supplier starting on a new page? Is that more realistic? So supplier will not be a parameter any more, but just something that creates a new page on the report?

    What
    about still running ONE report, but every supplier starting on a new page? Is that more realistic? So supplier will not be a parameter any more, but just something that creates a new page on the report?
    Yes thats a much better option. Its very easy to generate such a report in SSRS. You dont need a parameter
    in that case but just needs to add Supplier as a grouping field in the tablix. Then add other columns and groups if required. Select option set page break after each instance of the group for first grouping (ie based on supplier field). Then report will render
    with one page per supplier. On exporting to excel also each supplier data goes to a different tab
    Here's a similar requirement I did for one of my projects
    http://visakhm.blogspot.in/2013/10/using-ssrs-to-export-sqlserver-data-to.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • How do I get the messages on my macbook to send from my phone number

    I have been using my macbook pro for iMessage for at least a year. Yesterday I reset the password because I received a notification that there had been a log in to my iCloud from an outside source. Today I am messaging and the person receiving the iM

  • How can I disenable the EXCEL field format when use ALV download to excel ?

    Dear friends,      I have a problem with the ALV download to EXCEL. One field Value in ALV is like u2018-abcdeu2026u2019.the character u201C-u201Cis the first   position  in field value.when I download  the value to EXCEL,the field value u2018-abcdeu

  • Can we peek into System V message queue?

    Hi, there. I have to processes A and B, talking through system v message queue. For debugging purposes, I wish to attach a third process C to that message queue and print out what info process A and B are exchanging. Is that possible? thanks

  • How do I remove signs indicating space, line shift etc.

    I must have done something stupid, for suddenly there are a lot of small devils, that indicate each space, forced line shift etc. How do I get rid of them, before they drive me crazy? Thank you very much

  • Why does resaving an unchanged PDF change the size?

    I have a client that sends me a PDF daily. If I take the file I was given, open it in Acrobat Reader XI and re-save it (without making any changes to it), the file size reduces by maybe 20-100kb. How do I determine what is the difference between the