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

linking crystal report to Activex item of Sapbouicom Object.

Hai everybody!!!!! ,

I am working on Report generation Using Crystal report for SAP business One..........

I tried a lot for the above using following code.........

Dim ax As SAPbouiCOM.ActiveX

Dim cr as CrystalDecisions.Windows.Forms.CrystalReportViewer

oItem = oForm.Items.Add("a", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)

oItem.Top = 0

oItem.Left = 0

oItem.Width = oForm.Width

oItem.Height = oForm.Height

oItem.Visible = True

ax = oItem.Specific

ax.ClassID = "{6B015A3F-99CD-4138-BAB5-8849EB7C6560}"

cr = New CrystalDecisions.Windows.Forms.CrystalReportViewer

cr = ax.Object''here i am getting error message as invalid cast''

cr.ReportSource = "C:\BarCode\Status\CrystalReport1.rpt"

but i am not getting the result,

but when i run crystal report only in Vb.net i.e. in the system form

its working fine,but in SAPB1 Form its not working .....

Please help me to solve this Problem.......

I am Waiting for your reply.............................

Chethan B.E.

chethu.342@gmail.com

9342504047.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 19, 2007 at 10:07 PM

    try attaching the crystal reports active X to a regular windows form. The windows form will work with no problem if call from within SAP. I know that probably you will want to keep the look and feel of the SAP environment but I think that in this case you will have to go with the windows form.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 03:26 PM

    I think it is because the Crystal decisions object is a .NET component and you need to use a class that is exposed to COM.

    Try looking for a COM component.

    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.