.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 2008 - Passing parameter into textbox - can't seem to apply formatting to it (date/currency)

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :

I have a report that is displaying a parameter in a textbox inside the report.

Now I right clicked on the textbox, went to properties, and set number formatting to: Date - 01/31/2000

However, when I render the report it does not display the date in that format. It displays it in the way the sproc returns it which is: 5/13/2011 3:08:30 PM

I tried changing the parameter type to TEXT instead of datetime, made no difference.

I am having the same problem with currency. I will return 12345 and it will just display that way in the textbox instead of $12,345.00.

Any suggestions?

View Complete Post

More Related Resource Links

SSRS 2008 date validation

Hello, Perhaps somone can shed some light on this. I want to make sure the user doesn't set a Startdate > EndDate  in a report. I've done some thing like this: Go to the Report Properties under the Report menu and place this code to the Code Tab. Public Function CheckDate(SDate as Date, EDate as Date) as Integer Dim msg as String msg = "" If (SDate > EDate) Then msg="Start Date should not be later than End Date" End If If msg <> "" Then MsgBox(msg, 16, "Parameter Validation Error") Err.Raise(6,Report) 'Raise an overflow End If End Function Then go to the Report Parameters and Add named it XXX with the datatype is string. Checked the Hidden and Allow blank value ckeckboxes. In Available Values choose Non-Queried and from Default Values choose Non-Queried in right side of textbox then press the FX button then paste this code. =CODE.CheckDate( .Value) But I'm having problems with the =CODE.CheckDate( .Value)  syntax. SSRS errors out. Any suggestions/insights? --joe

Help Passing Multiple Parameters Via a URL in SSRS 2008

Hello Everyone, I'm totally and completely confused as to how to pass multiple paramters through a URL.  Book Online is absolutely no help because they do not offer any examples of passing multiple paramters within a URL.  Instead, I get confused over RENDER and COMMAND and what should be repeated where with each paramter and on and on and on. Here's my URL: javascript:void(window.open('http://sereporting01.wdig.com/ReportServer?%2fDOL%2fTEST%2fDisney+Sell-Through&rs:Command=Render&SiteName=Disney,InsertionType=300 x 250,Context=ROS','_blank','resizable=yes,toolbar=0,menubar=0')) What happens is that JavaScript opens a new window but I get a "Reporting Services Error".  I'm assuming it's because my URL parameters are not correct.  Can someone please just give me the correct syntax so that I can get on with my work? I'm editing this post to add - I'm also confused as to how paramters are supposed to be passed through to a report when default paramters are set up in the report which i'm trying to open with the URL.  Should I remove the default paramaters from the report or...what? Again, BOL offers no help on this issue and it just seems to generate more questions.  Thanks!!  

ssrs 2008 R2 - report parameter with no default set throws java script error

We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports. It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection. Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.

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

SSRS 2005 Drillthrough chart Passing Wrong parameter value

Hi I have a drillthrough report that in Report A I have a week of data, showing Sunday through Saturday on the X-axis. When a data point is clicked on this chart, it shpuld pass the date of the weekday for that data point to Report B. But sometimes, it passes the prior weekday date, eg click on the Monday date data point, but Sunday's date is passed to the next report. Has anyone observed this type of behavior? I should mention that it is intermittent.   Thanks all.   Bobrpress

SSRS problem with passing multiple parameter values via URL %2c

Hi, I have a problem with passing multiple parameter values from one report (A) to another report (B).   For example I built a URL string in report (A) with the parameters like &Parameter1=1&Parameter1=2. As soon as I click on that URL the URL parameters look like &Parameter1=1%2c2 and the parameters don’t getting populated on report (B).   If I change the parameter in the URL to &Parameter1=1&Parameter1=2 and execute the URL manual the parameter on report (B) getting populated properly.   Is there a way to disable the coding like %2c (comma) or is there another solution for it?   Thanks

SSRS 2008 question? Date Help

Hi Experts, I'm new to SSRS world. I'm trying to print current date in the format of "Month-Name Date, Year", here is the t-sql query:- SELECT DATENAME(MONTH, GETDATE()) + ' ' + CAST(DAY(GETDATE()) AS VARCHAR(2)) + ', ' + CAST(DATEPART(YEAR, GETDATE()) AS VARCHAR(4)) AS [Month DD] --'September 14, 2010' Everything is working perfectly untill here, now I placed text-box with exp as :- =DATENAME(MONTH, NOW()) + " " + CAST(DAY(NOW()) AS VARCHAR(2)) + ", " + CAST(DATEPART(YEAR, NOW()) AS VARCHAR(4)) AS [Month DD YYYY] But it is giving error as :- The Value expression for the text run "Textbox22.Paragraph[0].TextRuns[0]' contains an error: Name 'DATENAME' is not declared. I understood the error, saying DATENAME is not the appropriate function in SSRS, so my question is can somebody write me correct code to give me o/p in the form of my above t-sql query   Any Help? I'm using SSRS 2008 Thanks Regards, Kumar

SSRS 2008 formatting issue - different in visual studio preview/pdf/excel vs. internet explorer


The formatting of the report is perfect when viewed in Visual studio and also after exporting it to pdf or excel. But when I deployed my solution and opened it on IE/Firefox there is a lot of problem in formatting. Specifically the row height is giving me a problem. I manually entered them to be 0.1in and made the CanGrow field as false to force that row height but some rows in the tablix expand ( to 0.15in, which is the height of my header). This is true for a matrix as well. Is there is a feature to lock the row height in IE o any other web browser?


SSRS 2008 Cascading Parameter Problems


We are having a problem with dependent parameters.  Has anyone see something like this with ssrs 2008?  It is a show stopper for us.  After everything tested out ok (or with only minor gui bugs), we set a date to roll this to production.  With this recent discovery, we are unable to move forward until it is resolved.  We didn't notice it since there are a small number of our 400 some reports that do this type of thing.  Unfortunately, they are the most important in our organization.  These worked without a problem in 2005.

Sample below:

 ReportMode (depends on what is selected in RunAsUser)

Avail: ID from ReportModeDataSet

Default: ID from ReportModeDataSet

 Location (depends on what is selected in ReportMode)

Avail: ID from LocationDataSet


SSRS 2008 - Report Parameter is read only


I have a main report that has two parameters (RptMonth, Reports).  RptMonth which the user selects from a calendar, and Reports which is a dropdown list. Produces main report correctly.

I want to goto a second report (Detail) based on clicking a textbox named KPI. I configured the textbox to Go To Report, added this parameter named ID value [ID] that is in the dataset of the query. Parameter settings - Name=ID, datatype=Integer, parameter visibility=hidden.

Get values from query=Dataset1, value field=ID, label field=KPI. Using always refresh. This is all configured in the main report. In the detail report I have one parameter named ID,  type Integer, visibility=hidden.

Security for both reports use embedded connection, type SQL server. When I run the main report and click on the KPI textbox it passes the ID and I get the correct detail report. When I deploy it to the server I get

SSRS 2008 R2 - Parent Child Hierarchy - Searchable Parameter List


Hi dear,

I'm, workin at the moment on a report for my company. I have a problem with searching in a parameter list which is based upon a parent child hierarchy. The users asked me for type in the first few characters to search the parameter faster (like in this post ) , because it's a large hierarchy with about 1700 values. In a "normal" list ("linear" without  a hierarchy) this feature is available.

So my question:

Isn't it possible to search in the parameter list in general if this is based upon a hierarchy?

Are there any possibilities or suggestions to get this feature?

Or is this the only way to do this:



Thanks in advance!


Any way to change the icon to toggle the parameter panel in SSRS 2008 R2?


Is there any way I can change the icon that the HTML viewer in SSRS 2008 R2 uses to toggle the parameter panel?

I have users telling me it is too small and they want it bigger.  When I look at the page with the IE developer toolbar, the icon looks like it is being pulled from a resource inside ReportViewerWebControl.axd,

Does SSRS 2008 Support Rich Text Formatting?

Couldn't find any recent responses to this. Does anyone know if the 2008 version supports rich text formatting? Thanks

SSIS - Passing a date parameter to a SQL Query question again....


I need to pass a date string to my sqlcommand inside of my "datareader source".  I read some of the questions about setting expression variables but I can't seem to figure out how to do it.  I pasted the query below.  The table name contains a date in it so I need to pass that date as a string into my sqlcommand at runtime.  Do I create a variable with the entire SQL command in it or can I just create a single variable that holds the date and just reference that in my datasource reader sqlcommand property?  Can someone assist me with the syntax for creating the expression?

     pages_20101006.`date` AS full_date,
     pages_20101006.`cat` AS category_no,

Thanks very much,



Enable/Disable of Report parameter in SSRS 2008


Hi Friends,


I am stuck with one reporting issue and need your  help on that.

The source of the report is SSAS Cube.


I have 3 parameters





SSRS 2008 dynamic change to report parameter properties


I'm running SSRS 2008, and I'm wondering if it is possible to change a report parameter property based on user input in another report parameter.  What I need to do is to make report parameter #2 a required parameter if a specific value is selected in parameter #1.  Parameter #2 should be optional under all other scenario.

Thanks in advance.

SSRS 2008 w/CU6 - Parameter Default Value Refresh Issue.



We are experiencing trouble with a parameter default value (parameter 2) not refreshing when it's parents parameter value is updated (parameter 1).  The problem parameter (2) has specified values in the available values, and has a dataset that loads the default values depending a parameter above it.

The first time that parameter 1 is selected, parameter 2 is updated with the correct default value... BUT, when parameter 1 is changed, parameter 2 does not update.

If I change the problem parameter's (2) available values to the dataset where the default values come from, it works fine, but that doesn't fill the business requirement of this report.  I also tried setting parameter 2 properties to "always refresh" but that doesn't appear to refresh the default values.

What else can I try?








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