Skip to Content
0
Former Member
May 19, 2007 at 07:15 AM

linking crystal report to Activex item of Sapbouicom Object.

30 Views

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.