Hi Expert,
I want to display crystal report on SAP B1 user defined form (Screen Painter Form).
I used below but it's not working.
My steps If I feel correct:
1. Creating activex viewer - let's say done
2. I need some object which holds the report itself, and can be customized by parameters of the report.
3. As next step, i shoudl define connection to SAP B1 database.
4. I need to display the report
I tried these steps with 10.2 version of ActiveX viewer, but (VB.NET CODE version 2005)
oItem = oForm.Items.Add("4", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
'Step 1Creating activex viewer
oItem.Top = 5
oItem.Left = 5
oItem.Width = Maxw
oItem.Height = Maxh
Dim oActiveX1 As SAPbouiCOM.ActiveX = oItem.Specific
Dim CRViewer As CrystalActiveXReportViewerLib102.CrystalActiveXReportViewer
'Here we can use VersionIndependentProgID property from registry, which is better the defining the version based on my Experience , but i have used the version dependent.
CRViewer = oActiveX1.Object
'step 2. I need some object which holds the report itself, and can be customized by parameters of the report.
Dim CRApp As New CRAXDDRT.Application
Dim CRRep As New CRAXDDRT.Report
'step 3. i shoudl define connection to SAP B1 database
CRApp.LogOnServer( DLLNAME, "SERVERNAME", "COMPANYDB", "DBUSER", "DBPWD")
CRRep = CRApp.OpenReport(System.Windows.Forms.Application.StartupPath() + "sample.rpt")
'step 4 display the report
CRViewer.ReportSource = CRRep
CRViewer.ViewReport()
Please help on this.
Thanks & Regards,
Tushar