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


Top 5 Contributors of the Month
Kaviya Balasubramanian
satyapriyanayak
SP
abhays
Sasi Prabhu
Post New Web Links

SSRS 2008 datetime parameters

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :Sql Server
 

Greetings:

I am trying to design a report that has a parameter named Time Period which, essentially, has the following available values: Last 24 hours, Last 7 days, Last Month, etc.  I have two other datetime parameters named Start Date and End Date which are going to specify the date ranges for which the report will select the data.

The Time period parameter is needed so that if the user specifies "Last Month", for example, the Start Date and End Date parameters automatically refresh to show the date ranges for the last month.  More so, the user can still be able to specify a different date range that they can pick from the calendar picker.

I have encountered several issues in trying to make this work:

  1. If I only specify a default value to the start date and end date parameters, it will only refresh for the initial run, but will not refresh every time I change the Time Period parameter selection.
  2. If I specify "Available Values" to the datetime parameters, then the parameter will turn into a dropdown field and the user will not be able to choose any date from the calendar picker.

I found a work around for this issue by creating an intermediate parameter and every time I change the time period option it will refresh the parameter since it has a stored procedure assigned


View Complete Post


More Related Resource Links

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!!  

string to datetime conversion using date parameters in SSRS

  

Hello, I have a database field that I am pulling that is type string, but the format of each value is mm/dd/yyyy.  I want to convert this to a datetime format (minus the time) so that i can compare this value to a parameter date range (begin date and end date) that are type datetime so that i can use the calendar control in my report.  i've tried in my select statement to use select.....convert(datetime, stringfieldname, 101), but I get an error that says "Conversion failed when converting datetime to character string". 

I am also open to converting the datetime parameters to strings to do the comparison, but not sure the best way to do this either.

thanks!


IE8 POST Parameters to SSRS 2008 Not Working

  

I am not a web expert nor a programming expert.  I know a fair amount about SSRS.  With that being said, we are having an issue with our internal architecture.  We have some custom search forms set up for users to edit/enter parameters.  These search forms then POST the parameters to the proper report in a new window.

This has always worked without a problem.  However, now that we are starting to bring up machines that are Win 7 IE8, we are seeing issues.  With an IE8 machine, the POST no longer works.

It would be great if someone was able to give me their opinion on the matter.  While this could be an IE8 issue, this will not happen if I post to any other site besides SSRS.  Every other site we have tested seems to work just fine - this is why I am starting this thread here.   For some reason, when it comes to SSRS, IE8 does not want to POST on the first attempt.

Here is our search form simplified for this example:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="onemoretest.aspx.cs" Inherits="GetAndPost.onemoretest" %>

<!DOCTYPE html PUBLIC

SSRS 2008 R2 - datetime parameter "visually" format?

  

Hi, I have SSRS 2008 R2 in SharePoint 2010 integration mode.

My report has Date/Time data type parameter. When user open report, "visually" date format is MM/DD/YYYY, but I would like to have DD/MM/YYYY format (same if user pick date from Calender drop-down date selection). Any idea (like is it Report Server region settings or SSRS settings OR SharePoint date settings OR ... ).

Any idea how to "visually" shows date parameter as DD/MM/YYYY format? Thank You.


SSRS 2008 R2 and sharepoint 2007 report builder problems

  

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

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

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

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

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


SQL 2008 servers and MOSS 2007 with SSRS

  

I need help figuring out the limitations in a multi-database server environment and MOSS 2007 installation with SSRS.  Here is the run down:

  • I currently have MOSS 2007 server with backend on SQL 2005, which also acts as the SSRS server.  In addition I have another SQL 2005 server where business data resides and against which most of the SSRS reports run.
  • Future plan (over which I don't really have a say) is MOSS 2007 with backend on SQL 2008, which will remain to be the SSRS server.  The second SQL server with business data will be migrated to SQL 2008 R2.

Questions: does this architecture requires SSRS 2008 add-in or SSRS 2008 R2 add-in (integrated mode)?  Will there be an issue of building SSRS 2008 reports that go after SQL 2008 R2 and SQL 2008 data mix?


SSRS 2008 Graph Type?

  

Greetings -

 

I am required to plot the following graph in an SSRS report.

 

Sum of Total Credits to be shown on Positive side and total sum of Debits for a month on negative side. I have created a query which retrieves all the expenses for the month and sums them up before feeding the same to the graph for plotting. Both values returned are positive integers.

 

(Sorry for the diagram below, i tried to paste an image but it didn't work)

Output parameters in OLEDB Command component - SSIS 2008

  
I have a package that I developed in SSIS 2005 and recently ported to 2008. Everything runs great except an OLE DB Command component that calls a stored procedure that uses output parameters. When I try to run this, I get this error: Error: 0xC0202009 at Data Flow Task, OLE DB Command [100]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Syntax error, permission violation, or other nonspecific error". Error: 0xC004701A at Data Flow Task, SSIS.Pipeline: component "OLE DB Command" (100) failed the pre-execute phase and returned error code 0xC0202009. When I do the same thing in SSIS2005, it works fine. So I setup a new package with 1 data flow. In that data flow, I added a source component, an OLE DB Command, and a destination.  I then tested this with a stored procedure that took no parameters. It worked fine. I then tested it with a stored procedure with 1 parameter defined as OUTPUT. This generated the error.   Is there an issue with output parameters in an OLE DB Command in SSIS 2008?   Thanks!http://bobp1339.blogspot.com

Data validation for datetime parameter in SSRS

  
Hi,   I wanted to know more about validation of SSRS parameters. I have a simple report which has a parameter called startdate of DateTime datatype. The datetime parameter in SSRS takes manual input as well. So, the user can enter any junk value. I want to ensure that the input parameter is in correct format and I want to display an error msg when the format is incorrect. My report has the following VB code for validation:   Public Function Validate( ByVal startdate As String) As BooleanIf IsDate(startdate) = True Then Return TrueElse Return FalseEnd IfEnd Function   And my report has a textbox which has the expression property set to; =Code.Validate(Parameters!startdate.Value) the textbox on the report has to display if the entered date is valid or not.   But, when i enter an erroneous date, SSRS doesn't render the report and throws a generic error. This happens even before the code written for validating the parameter executes.   Also couldn't find a way to disable the manual input for the datetime parameter. Even that would solve the problem.   Another alternative was to make the startdate parameter as string, but i want the calendar control button to be provided for the user.

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

Dual values in Column chart Y axis in SSRS 2008

  
Hi,  Any one pls tell me how to show dual values in Column chart Y axis. Example: Im showing Total Number of clients in the Y axis of column chart My Requirement is In that Y axis column chart also  i want to show differently of Inactive clients from total number of clients. how to do this pls help me. Thanks in advance. TotalnumberOf clients :  1000 InActive Clients : 200 among TotalnumberofClients      

Line Divider i n Column chart in SSRS 2008

  
Hi,  Any one pls tel me how to do the single line divider in Column chart in SSRS 2008 example: --------- |               | |     20      | ---------- |       100 | |               | -------------------------------   i want to show the above example. Thanks in advance Regards, Abdul2010

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 R2]Report Builder Access error-The remote server returned an error: (401) Unauthorized.

  
Hello,        I am able to login Web Service URL and report manager using computer name and report builder is also working fine.  http://RPTSRV/reportserver   (RPTSRV is report server name. web service url working fine. all accessible) http://RPTSRV/reports  (report manager working fine and all accessible ,report builder too) It means I am able to access everything locally right? http://rs.test.abc.com/reportserver  (web service url working fine. all accessible)  http://rs.test.abc.com/reports    (Report manager working fine and all accessible accept report builder)(I carefully checked the link and its taking rs.test.abc.com/reportserver.....)     when I click on reportbuilder button in report manager it shows me error dialog box with following error log!! I tried from local and remote computer too but gives the same error both side. I am not sure but I am just thinking is this double hop kerberos security issue? Please help me to solve this problem. I am finding solution from last 4 days. Reporting Service configuratin tool settings Web Serivice URL -  all set to default Report Manager URL - all set to default Environment - Distributed deployment Server1(report_srv) --Windows server 2003, Installed sql server 2008R2 reporting service,
Categories: 
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