Skip to main content

I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

The code fails as in will not compile? or errors on execution? If on execution .. what error message shows or is in the trace?


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

The code compiles. The error occurs on the first modify statement.

Error shown: Don't use CreateObject(). Report not initialized properly.

In VB6 you get the same error if you use "dim rpt as ActiveReport" in stead of "dim rpt as new ActiveReport".


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

The code compiles. The error occurs on the first modify statement.

Error shown: Don't use CreateObject(). Report not initialized properly.

In VB6 you get the same error if you use "dim rpt as ActiveReport" in stead of "dim rpt as new ActiveReport".


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

Without seeing the def file for this .. I will be taking a guess .. is ActiveReport declared as an Application in the def file .. I am suspecting not ... the Create phrase is like a Call "prog" phrase ... use Create to make an instance of the Application (in the def file .. i.e. Excel) then use the modify to create and fill the report.


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

Here is the def file for ActiveReport


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

I would try doing the create on the  @DDActiveReports2 and then modify on the ActiveReport


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

When I create on  @DDActiveReports2 the code doesn't compile and I get the following error: Object class name expected, @DDACTIVEREPORTS2 found.

I assume the create statement uses CreateObject() (in VB terms) to define an instance of the class.

CreateObject() in VB works and creates an instance of "DDActiveReports2.ActiveReport".

Looks like to create statement doesn't initialize the class ActiveReport correctly.

Here is VB code that works:

Dim rpt As ActiveReport

Set rpt = CreateObject("DDActiveReports2.ActiveReport")

rpt.LoadLayout ("e:\\\\1.rpx")

ARViewer21.ReportSource = rpt

ARViewer21.Refresh


I'm trying to use COM in ACU with little success.

Below is VB6 code (working):

Dim rpt As New ActiveReport
rpt.LoadLayout ("e:\\1.rpx")
ARViewer21.ReportSource = rpt
ARViewer21.Refresh

and COBOL code (not working):

           77 rpt usage handle of ActiveReport.

           create ActiveReport handle in rpt.
           modify rpt @LoadLayout("e:\\1.rpx").      
           modify rptViewer @ReportSource = rpt.
           modify rptViewer @Refresh().

This code fails on the first modify statement.

Please help.


#COM
#ActiveX

Howdy, sorry, this is getting beyond my skills .. have you tried create DDActiveReports2.ActiveReport? I know there are a couple of forum people who use Data Dynamics tools, hopefully they can assist.