p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Reporting Services (http://p2p.wrox.com/forumdisplay.php?f=205)
-   -   problem with dateTime picker (http://p2p.wrox.com/showthread.php?t=54090)

roy_mm February 15th, 2007 04:31 AM

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.



felixm_jr February 15th, 2007 05:32 AM

    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.


dlowry March 14th, 2007 11:34 AM

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.



All times are GMT -4. The time now is 11:17 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.