Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing parameter to viewer object

Status
Not open for further replies.

jhobrlant

Technical User
Nov 27, 2003
7
0
0
US
Hi,

I'm trying to view my report not prompting for the parameter, but have it passed through the csp code. The ParameterFields property should do this (acc. to docu). But is does not: "Unable to create report viewer. -2147467259".

I'm sure it's just a bit. The report has in total 6 parameters where the last 5 have defaults, only the first (RCountry) needs to be set.

With viewer1
.ReportSource = rptSource
.EnterpriseLogon = iStore.EnterpriseSession
.EnableParameterPrompting = False
.ParameterFields.Item(0) = "Germany"
.URI = CStr( Request.ServerVariables.Item("PATH_INFO") & "?" & Request.ServerVariables.Item("QUERY_STRING"))
End With

If Err.Number <> 0 Then
'There was an error setting up the viewer.
Response.Write "Unable to create report viewer. " & Err.number
Else
'Process the request and launch the viewer.
viewer1.ProcessHttpRequest Request, Response, Session
End If
 
Did you resolve this issue as I have pretty much the same problem?
 
Hi,
Are you sure it is the parameter that is causing the error?
Try it without it and see what happens( if you haven't already done this).

Could you post the code that creates viewer1?


[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top