Intellicus Enterprise Reporting and Business Insights 19.1

CVista

0 views September 22, 2020 0

Important:

MSDEV will crash if the resource dialog box (which contains the CVista ActiveX control) is open and one closes it and then re-compiles or closes the workspace or MSDEV.

Workaround – One should not open this dialog box in resource editor unless it is needed.

Assertion occurs when a report run through a ‘debug build’ executable, fails to execute.

The Basics

CVista is an ActiveX control used for viewing reports.  CVista is intellicus’s proprietary format.

APIs Exposed

CreateReportInstance(long ReportType, [optional]VARIANT IRLData,[optional] VARIANT bIsReportVisible)

This API is used to create a new Instance of a report.  It takes following parameters:

Mandatory Parameter

ReportType: Report type.  Possible value-enums are:

  • eRT_STATIC if the report is a static report
  • eRT_DYNAMIC if the report is dynamic report
  • eRT_SAVEDREPORT if the report is a published report
Optional Parameters

IRLData: Content of IRL file.

BIsReportVisible: To set if the report should be visible or not.

  • True: To make the report visible.
  • False: To hide the report.
ExportReport(long ReportID, [optional]VARIANT eOutputFormat, [optional]VARIANT bstrOutputFileName)

This API is used to export a report.  It takes following parameters:

Mandatory Parameters

ReportID: Report ID of the report to be exported.  Pass –1 to export the active report.

Optional Parameters

eOutPutFormat: Output format in which the report should be exported.

bstrOutputFileName:  Name of output file.  File will be saved with this name.

HandleKeys (long KeyCode, long Shift)

This API is called to handle keyboard events on Cvista level.  This API was exposed due to TAB Control used in Studio which was capturing Arrow keys event.  Due to which CVista was not able to handle arrow key events for scrolling when used in studio.

Initialize (long SourceType, BSTR bstrSourceName)

This API is used to configure CVista before executing a report.  It has following parameters:

 Mandatory Parameters

SourceType: Type of source from where report will come.

BstrSourceName: Name of source from where report will come.

SourceType uses e-nums.  Value for bstrSourceName should be passed based on the value of SourceType.

SourceType and corresponding source name can be any of the following:

SourceType bstrSourceName
eST_ENGINE Ip:Port
eST_URL URL
eST_REPORTFILE File name
InitializeDefault

This API Provides the Default Initialization to CVista.

LoggingInfo(BSTR bstrFilePath, long level)

This is an API used to set logging information.

Mandatory Parameters

bstrFilePath: To set log file path.

level: To set log level.

OpenReport(BSTR bstrReportName)

This API is used to open a report saved on a file system.  It throws exception to the host application if any error occurs at the time of opening the report.  It has following parameter:

BstrReportName: The report name including its absolute path.

PrintReport(short ReportID , [optional] VARIANT bstrPrinterName)

This API is used to print a report.  It has following parameters:

Mandatory Parameter

This is an API exposed by CVista to print the report specified by ReportID. It takes another optional parameter Printer Name, which is not used as of now. It is reserved for future use. Passing ReportID value as -1 will print the active report.

RemoveAllReports

This is an API exposed by CVista for Deleting All the Report instance.

RemoveReport(long ReportID)

This is an API exposed by CVista for Deleting the Report instance specified by ReportID. Passing ReportID value as -1 will remove the active report.

SaveReport(long ReportID , [optional] VARIANT bstrOutputFileName)

This API saves the Report specified by ReportID to report output to a file on the Disk. Path is specified by the bstrOutputFileName parameter. Passing ReportID value as -1 will save the active report.

SetReportConnection(long ReportID, BSTR bstrReportTitle)

This is an API exposed by CVista for setting the connection name for the report specified by ReportID. Passing ReportID value as -1 will set the connection name for the most active report. If failed, an exception is thrown to the host application.

SetReportParameters(IReportParameters* pReportParameters)

This API is required for setting the ReportParameters for the Active Report.

SetReportTitle(long ReportID, BSTR bstrReportTitle)

This API is exposed by CVista for setting the report title for the report specified by ReportID. Passing ReportID value as -1 will set the report title for the most active report. If failed, an exception is thrown to the host application.

SetShowParamDialog(VARIANT_BOOL bShowParamDialog)

This API is required for setting whether to show Parameter Dialog or not.

SetSysParam(long Name, BSTR Value)

This is an API exposed by CVista for Setting the Values of System parameters for a report. It takes name of system parameter as enum specified bye SysConstants enum. This API sets the system parameter for the most active report.

SetUserInfo(IUserInfo* pUserInfo, VARIANT_BOOL bIsSecurityEnabled)

This API is required for setting the User Info and security options. If failed, an exception is thrown to the host application.

ShowNextPage(long ReportID)

This API is called when the user wants to navigate to the next page of the report specified by ReportID. Passing ReportID value as -1 will navigate to next page of the most active report.

ShowPage(long ReportID, long PageNo)

This API is exposed by CVista to navigate to the specific page for report specified by ReportID. Passing ReportID value as -1 will navigate to page specified by PageNo of the most active report.

ShowPrevPage(long ReportID)

This API is called when the user wants to navigate to the previous page of the report specified by ReportID. Passing ReportID value as -1 will navigate to previous page of the most active report.

ShowReport

This API initiates the display of most active report. If failed, an exception is thrown to the host application.

ShowSavedReport(BSTR bstrReportName,BSTR bstrOutputID, BSTR bstrReportOID)

This API shows the saved report. Saved Report is specified by OutputID and ReportOID.  Report Name is specified by bstrReportName. If failed, an exception is thrown to the host application.

StopReportExecution(long ReportID)

This is an API exposed by CVista for stopping the execution of report specified by ReportID. Passing value of ReportID as -1 will stop the execution of the most active report.