June 30, 2006 at 10:09 am
This report worked fine in RS2000. Deployed to RS2005. Report is rendered programmatically from Application using
result = rs.Render(m_ReportName, m_RenderType,
Nothing, Nothing, m_paramValues, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
m_paramValues has the parameter values of course. THe report defines the values as coming from queries and both are set to default from the queries. In Report manager it runs fine, but rendering from vb.net app I getDefault value or value provided for the report parameter 'buyer' is not a valid value."
The report actually has two parameters, one is a date and the other a 2 character string that might look like "04". It is the "04" it doesn't seem to like.
Is there a difference in passing multiple single parameters via code. This is not a multi select for one parameter but 2 different parameters.
July 3, 2006 at 8:00 am
This was removed by the editor as SPAM
July 3, 2006 at 10:03 am
How do you fill your parameter values, could you please post the snippet for filling these and the parameter definition of the report ?
HTH, Jens Suessmeyer.
---
---
July 5, 2006 at 6:40 am
This is from Visual Studio 2003. The report was originally deployed on Reporting Services 2000 and we have recently switched to Reporting Services 2005. All worked fine in 2000.
Private Function RenderReports(ByVal ReportToRender As String, ByVal individual As String, ByVal buyerno As String) As String
Dim rs As New RptSrv.ReportingService
Dim fileexists As String
Dim result As Byte() = Nothing
Dim stream As FileStream
Dim fname As String
Dim paramValues(1) As RptSrv.ParameterValue
Dim DataSourceCredentials() As RptSrv.DataSourceCredentials
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Try
Application.DoEvents()
fname = CurDir() & "\reports\Tpr" & Trim(individual) & Format(Today, "MMddyyyy") & ".PDF"
fileexists = Dir(fname)
If fileexists <> "" Then
Kill(fname)
End If
ReportToRender = "/TprReport/" & ReportToRender
paramValues(0) =
New RptSrv.ParameterValue
paramValues(0).Name = "tprDate"
paramValues(0).Value = Format(Now, "MM/dd/yyyy")
paramValues(1) =
New RptSrv.ParameterValue
paramValues(1).Name = "buyer"
paramValues(1).Value = Trim(buyerno)
result = rs.Render(ReportToRender, "PDF",
Nothing, Nothing, paramValues, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
stream = File.Create(fname, result.Length)
stream.Write(result, 0, result.Length)
stream.Close()
RenderReports = fname
Catch ex As Exception
ErrHandler("Error in " & Application.ExecutablePath & " .RenderReports" & ex.Message)
RenderReports = ""
End Try
End Function
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply