.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SSRS 2005 SP3 - Instr function with Global Variable fails in Subscriptions

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
Hi I have a very simple expression in a text box in my report:  INSTR(Globals!ReportServerUrl,"Report").  This expression should return the integer value of where the string "Report" appears in the Global variable for the ReportServerUrl.  Simple enough.  This works fine for generating the report directly through report manager, and in my case returns a value of 20. However when run as a subscription and emailed to myself the value returned is 0. This suggests that the search string does not appear in the Global variable. In the reportserver config file the URLroot tag contains the correct server address - http://myserver/reportserver. Does anyone know why i should be experiencing this issue with my subscriptions?  Your help would be much appreciated! Thanks Guy  Guy

View Complete Post

More Related Resource Links

Can I Feed a table variable or table-like types to my function(My SQL version 2005 Standard SP3)?


Hello All:


My question is whether I can feed a table variable to my table-valued function in SQL 2005 SP3 standard edition?

If no, can I feed a XML type to the function? I guess, probably I can feed a XML. Yet, for this case I am afraid , in the function, the XML-parsing may be costly if I stuff over 10K uniqueIdentifier data into this XML variable.

Any good idea from you ?



--Derek D. 


SSRS 2005 passing Globals!PageNo as a variable into SubReport


I have a sub report which we are using as a generic header for all our reports and one of the requirements is it must have the current page / total pages displayed.

I know the Globals variable for page number and page count are only usable in the header or footer of a page but doing it this way isnt an option for me sadly.

Is there a workaround to this so that I can pass this value to a subreport as a parameter?


Question regarding Subscriptions in SSRS 2005


I have a question regarding subscriptions in SSRS 2005.

We have development (reports_dev)  and Production (reports_prod) environments .

I created a subscription in the Production environment for a report, and ticked the Include Link so that I can get the link of the Production environment reporting services of the report.

I am getting the email but in the email its showing the link of Development environment. (http://reports_dev/reportserver................)

So my question is where can I find this information and how to change it to the correct Production environment link http://reports_prod/reportserver ..................

Any ideas?



connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

Is Conditional Subscription possible in SSRS 2005?


Hi Guys,

Is there a way to set up a subscription that will send e-mails based on the contents of a report? For example, I want to schedule a daily subscription that will only send an e-mail if the report contains data, otherwise it will do nothing for that day. i.e If the report has more than one row, it should send the mail otherwise it should not send the mail.....

Is it possible in SSRS 2005 or is there any other way to do it???


SSRS 2005 "Mixed" Authentication Mode


I have a web application where users can authenticate using either SiteMinder or Windows domain accounts.  This is actually configured as two separate virtual directories within IIS 6.  Both applications need to use the same instance of SSRS.  Is it possible to configure the SSRS web application so that if a user is authenticated by SiteMinder it impersonates a Windows account, but if they are already Windows-authenticated that account is used instead?

Function and Variable declaration with out an 'As' clause


I get a message - "Function without an 'As' clause" for HMAC_MD5 and "Variable declaration without an 'As' clause" for Key and Value.  But the code works.  But the messages still exists.  Is there a way to fix this to avoid the messages?

Function HMAC_MD5(ByVal Key, ByVal Value)


Report printing problem(ssrs 2005)

HI   i have a SSRS 2005 report with width as 32 inches i have a requirement to print the report in a3 landscape  but when i print the report it comes in 3 page width   is there any way to auto scale the report into a3 size without affecting the view in the report viewer   Thanks varun kumar

ssrs 2005 default value generates report

Hi, If all parameters have default value the report generates as soon as i load the report. Is it possible to only run the report when clicking on the view report button even if all parameters have default values? Thanks

Question regarding IIF statement and Grouping in SSRS 2005

Hi Guys, I am using SSRS 2005. I am facing small prob in using IIF statement to hide a column. I am having a Grouping in my table. (Emp_Group and the values are 'Yes' and 'No') Now, I want to hide a column of the table if Grouping is Yes and I want to show the table if Grouping is No. (When exported to excel it will appear in two different sheets). Any suggestions please............

SSRS 2005 external images won't display - images on DIFFERENT file server

Hi, Been having trouble getting external images to display in reports rendered on SSRS 2005. Images are displayed as a red X. However, my scenario is different from some of the examples I have read about. - The images are stored on a file server that is DIFFERENT from the box on which the Report Service is running. For various business reasons I cannot copy the images locally to the Report Service box. I am using "file://fileserver/path/to/image.jpg" to retrieve the images. - Since the file server does not have IIS installed, I cannot access the images using the URL method (http:// access). I need to use the file:// method. Currently I am prototyping this setup on my test box, which is running XP Pro and IIS 5.1. The Report Service is installed on this same box. I am currently testing this through the Report Manager web site (http://servername/Reports). The images are displayed using the Image control, which I added to the report using the visual report designer in Visual Studio 2005. It is set up with source=External and with "file://fileserver/path/to/image.jpg" path values. File names are retrieved from our database and file paths are built dynamically using a data processing extension I have written. My best guess as to why this is happening is that the ASPNET service account on my test box does not have access to the particular share on the file serve

Shared dataset in SSRS 2008 R2 running on SSAS 2005

I am trying to create a report in SSRS 2008 R2 using SSAS 2005 as a datasource. My dataset has a date parameter. When I create an embedded dataset in my report everything works fine, but when I create a shared dataset with the exact same mdx query, I get the following error: An error occurred during local report processing. The definition of the report 'xxxx' is invalid. The Value expression for the report parameter 'DateCalendarHierarchy' contains an error: [BC30034] Bracketed identifier is missing closing ']'. Does anybody have any ideas? Is this a bug? Thanks, Louis

How should I configure Asp.NET on IIS 6, Sql Server 2005 and SSRS 2005 across 2 Windows Server 2003

I was running a MIS reporting solution on a single server running MS Windows 2003 Server and Sql Server 2005. The solution was built using ASP.NET 2.0 on IIS 6.0, Sql Server DB & SSRS. I now have purchased a 2nd server running MS Windows 2003 Server and Sql Server 2005. What is the best configuration to split the following application components across the 2 physical servers? ASP.NET web application SQL Server 2005 Datawarehouse SSRS Web Applications (Reports & ReportServer) SSRS Databases (ReportServer & ReportServerTempDB) The hardware configuration of the 2 servers are as follows Server 1 MS Windows Server 2003 Enterprise Edition SP2 Intel(R) Xeon(R) CPU 5150 @2.66GHz 16 GB RAM Sql Server 2005 SP3 Standard Edition Smart Array P400 in Slot 1 (SAS Array A with Spare / SAS Array B with Spare) Drive C: 68.33 GB | Drive D: 273.40 GB Server 2 MS Windows Server 2003 Standard Edition SP2 Intel(R) Xeon(R) CPU X5570 @2.93GHz 4 GB RAM Sql Server 2005 SP3 Standard Edition IBM ServeRAID-MR10i SAS/SATA Controller Drive C: 135GB | Drive D: 556 GB | Drive E: 271 GB Any suggestions would be of great help

Transactional publication with updatable subscriptions in SQL Server 2005, SvPk 2

Subscription to "Transactional Publication with Updateable Subscriptions" works only one way.  Changes take effect on subscriber, but the subcriber is unable to update data on publisher.   I have Sanpshot Agent process running under SQL Server Agent service account with login 'sa.'  All agents are running at the Distributor (Publishing Server.)   The subscriber is unable to connect to the Distributor using the SQL Server login.    Following is the error message I get:   Creating Subscription(s)... - Creating subscription for 'SQL3' (Warning) Messages Unable to set the Publisher login for the updatable subscription. You may have to set this up directly on the Subscriber machine using sp_link_publication. (New Subscription Wizard)------------------------------ADDITIONAL INFORMATION:An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)------------------------------MSDTC on server 'SQL3' is unavailable.Changed database context to 'DB_SQL1_to_SQL3_on_3'. (Microsoft SQL Server, Error: 8501)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=8501&LinkId=20476   Please suggest procedure to end this dilemma.  The link has no info available.

SSRS 2005 WebService Programatic Multiple Parameters?

I am using ssrs webservices with c#. Works great until I try to pass in multiple parameters then I get: "Default value or value provided for the report parameter 'X' is not a valid value." I am at a loss - I have the split function in my stored procedure and can pass in the values like '01/05/2010,01/062010' etc no problems. I have tried wrapping the comma seperated string with single quotes and without, tried adding them as seperate inputs with no luck same response. Report works fine from SSRS interface but not when calling it using web services. Any assistance is greatly appreciated - I have done numerous web searches and found no answers. Below is the c# code snipet: //set up the parameters List<ParameterValue> input = new List<ParameterValue>(); ParameterValue pval = new ParameterValue(); pval.Name = param.Name; pval.Value = "'" + paramsSelected + "'"; input.Add(pval); //call the report service.Render( ReportName, "PDF", null, null, input.ToArray(), null, null, out encoding, out mime, out outParams, out outWarn, out outStreams);

SSRS 2008 Export to PDF fails for large data with System.Exception: Parameter is not valid

Hi, We are working on Range Bar Chart using SSRS 2008. The report has huge data. It is properly displaying the data, but when we tried to export to pdf it is failing with the following exception. Exporting to excel works fine. Also if the report has small/medium data it is property exporting to PDF. It is failing only in case of huge data (we have custom page size of 28" X 14"). Of course the report has lot of expressions we used to customize the colors/text as per our requirements.   Server Error in '/Reports_SQLDEV2008' Application. Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Exception: Parameter is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:   [Exception: Parameter is not valid.]   [Exception: An error occurred during rendering of the report.]   [Exception: An error occurred during rendering of the report.]    Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream ou

Question regarding SSRS 2005

Hi Guys, I am using SSRS 2005. I am using a parameter named Employee (and it has the ability to accept multiple values like this : '100,200,300' or '100', or '100,'1453' etc. I made this possible in the Stored Proc using some Split function) Now What I want is when we enter values manually in the Employee parameter, I want to display their respective names in the Header part of the report. For example, if we enter values '100,'1453'  and view the report, I want the Header information to be displayed as 'James,Steve'. And I am having fields named Employee_Code and Emplyee_Name in my report. And the report designed so that user should manually enter the values of employee codes. ANy ideas??? Thanks, Bablu.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend