SRSS Reporting Service Render via VBA?

C

CADave Mr. D

Hello all,

I am hopeful that someone has done something like this before... I've
just not found an example in my searching just yet.

Goal: Use MS Access VBA code to retrieve a ReportExecutionService
".Render" object (Reporting Web Services). Then save that object to a
file (a .pdf in my example). All I need to do is figure out how to
send my credentials and then use the .Render method to retrieve the
result object... From there I think I have code to save this to a
file.

VB.Net and C# Example
http://msdn.microsoft.com/en-us/lib...ervice2005.reportexecutionservice.render.aspx

Code Excerpt:
Dim myWS As clsws_ReportExecutionServic

Const format = "PDF"
Const devInfo = "<DeviceInfo><StartPage>1</StartPage><EndPage>2</
EndPage><OutputFormat>GIF</OutputFormat></DeviceInfo>"
Const imageDevInfoFormat = "<DeviceInfo><PageHeight>11in</
PageHeight><StartPage>3</StartPage><OutputFormat>{0}</OutputFormat></
DeviceInfo>"
Const encoding = ""
Const mimeType = ""
Const extension = ""
Const warnings = Null
Const streamIDs = Null

Dim result As ByteArrayAttachment30
result = myWS.wsm_Render(format, devInfo, extension, mimeType,
encoding, warnings, streamIDs)

On the last line of this code I get the error "Object variable or With
block variable not set". I'm assuming I am not setting the myWS
variable correctly? Anyone have experience with this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top