EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB33023: How to execute a Report Services document and export it to PDF using the MicroStrategy Intelligence Server SDK


Community Admin

• Strategy


Starting in MicroStrategy SDK 9.0.0 the IDSSExportEngineServer interface has been deleted from M5TYPLIB.dll.

Starting in Strategy SDK 9.0.0 the IDSSExportEngineServer interface has been deleted from M5TYPLIB.dll.
 
To export a Report Services document to PDF using the Intelligence Server COM API substitute the interface IDSSExportEngineServer for IDSSExportEngineServer2.
 
Use the following code instead:
 
Php
'Create Document Definition var
Dim MyDocumentDef As IDSSDocumentDefinition3
 
'Find document by ID
Set MyDocumentDef = MySource.FindObject("DC3373C945AA94645B2E549C97A1631E", DssTypeDocumentDefinition)
 
'Create document Instance and Document Server to execute the instance
Dim MyDocumentInstance As IDSSDocumentInstance3
Dim MyDocumentServer As DSSDocumentServer
 
'Create a new instance of Document Server
Set MyDocumentServer = MySession.Component(DssRoleDocumentSource)
 
'Execute document definition to get document insance
Set MyDocumentInstance = MyDocumentServer.ExecuteDefinition(MyDocumentDef, DssDocumentActionExecute)
 
'Execute document instance
MyDocumentServer.Execute MyDocumentInstance, DssDocumentActionExecuteAll
 
'Export the document instance to PDF using the Export Engine
Dim oExpEng As IDSSExportEngineServer2
Dim abcArray() As Byte
Set oExpEng = MySession.Component(DssRoleExportEngineServer)
oExpEng.ExportDocument MyDocumentInstance, DssExportFormatPdf, abcArray()
Dim myFile As String
myFile = "c:\temp\SDK.pdf"
Open myFile For Binary As 1 'open, put, and close the .pdf file
Put #1, 1, abcArray
Close #1
 
Set MyDocumentServer = Nothing
Set MyDocumentDef = Nothing
Set MyDocumentInstance = Nothing
Set MySession = Nothing
Set MySource = Nothing
Set MySource = Nothing
Set MyDataSource = Nothing
 
 
 
 
 
CUSTOMIZATION WARNING
 
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy consulting assistance.


Comment

0 comments

Details

Knowledge Article

Published:

June 22, 2017

Last Updated:

June 22, 2017