Skip to Content
author's profile photo Former Member
Former Member

How to Crystal report activeX

I am using the following code to add an ActiveX to a form :

Private Sub CreateFormWithActiveX()

Dim oCP As SAPbouiCOM.FormCreationParams

Dim oActiveX As SAPbouiCOM.ActiveX

oCP = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)

oCP.UniqueID = "MyFrm"

Try

oForm = SBO_Application.Forms.AddEx(oCP)

oForm.Width = 400

oForm.Height = 300

With oForm.Items.Add("ActX", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)

.Left = 5

.Top = 5

.Width = oForm.Width - 10

.Height = oForm.Height - 10

oActiveX = .Specific

oActiveX.ClassID = "AxCrystalActiveXReportViewerLib12.AxCrystalActiveXReportViewer"

.Visible = True

End With

oWebBrw = oActiveX.Object

oWebBrw.Navigate("http://www.visnovasolutions.com")

oForm.Visible = True

Catch ex As Exception

MsgBox(ex.Message & vbLf & ex.StackTrace)

oform = Nothing

SBO_Application.Forms.Item("MyFrm").Close()

End Try

End Sub

I want now undertstand how to add instead Shell.Explorer.2 the crystal report 12 ActiveX viewer.

Could somebody help me ?

Giuseppe

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 06:04 PM

    there is no active x component with crystal 12.

    you will have to use a windows form.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2009 at 06:58 PM

    if you want to use active x you must use crystal 11.5 or lower.

    if you want to see an example of using crystal 12 in an addon- please download the crystal source- available in the downloads section of this website.

    With crystal 12 you must either:

    1. write and call your own application

    2. create a windows form within the addon and call it via a separate thread.

    If there is a better option I don't know it- but I'd love to hear it.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.