Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > Reporting Services
|
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2007, 04:31 AM
Authorized User
 
Join Date: Aug 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with dateTime picker

Hello.
I've just created a new report and I added a prameter of type "DateTime".
I didn't even used it in the query.
Whan I preview the report I have the small calendar Icon.
after I pick a time from the picker And press "View Report"
I get the error:
"the value provided for the report parameter P1 is not valid for its type"

I'm using RS 2005.

Any body know whats the problem?

Thanks in advance,
Roy.


 
Old February 15th, 2007, 05:32 AM
Registered User
 
Join Date: Feb 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

    Public Sub DailyReport(ByVal recdate As Date)
        reportViewer.ServerReport.ReportServerUrl = New System.Uri("http://localhost/ReportServer/")
        reportViewer.ServerReport.ReportPath = "/TA_Report/DailyTA"

        Dim params(0) As Microsoft.Reporting.WinForms.ReportParameter
        params(0) = New Microsoft.Reporting.WinForms.ReportParameter("RecD ate", recdate)

        reportViewer.ServerReport.SetParameters(params)

        Me.reportViewer.RefreshReport()
    End Sub

try something similar to this one but changes some value according to your variables.
"RecDate" is parameter name that i declare in report designer
recdate is Date type that i pass to the parameter.

 
Old March 14th, 2007, 11:34 AM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why would you need a report parameter if you do not have a parameter in your SQL query.
Try putting a date parameter in the query. Seems like RS does not know what to do with the one at report level.






Similar Threads
Thread Thread Starter Forum Replies Last Post
DateTime Problem kwilliams ASP.NET 2.0 Professional 1 March 12th, 2008 01:36 PM
DateTime Picker sconineuk VB.NET 2002/2003 Basics 2 March 9th, 2006 01:09 PM
DateTime problem acko Pro VB Databases 7 October 31st, 2004 05:53 AM
Color picker problem abq23 Dreamweaver (all versions) 7 June 2nd, 2004 12:11 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.