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

print preview for crystal report

hi kings,

I have one problem . I Designed userform that form have print button when i press the print button the crystal report Open and show the data. but the report is not open when i press the button.Please any one help me out of this issue

the error Shows-Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))

 Dim oForm As SAPbouiCOM.Form
                    oForm = gonAppApplication.Forms.Item("Emr_NewNCMR")
                    Dim Docnum As String = ""
                    Docnum = oForm.Items.Item("txtDocNo").Specific.value
                    Dim cr As New CRAXDDRT.Report
                    Dim apcr As New CRAXDDRT.Application
                    Dim myCrystalReportViewer As CrystalActiveXReportViewerLib102.CrystalActiveXReportViewer
                    Dim RptDoc As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                    RptDoc.Load(System.Windows.Forms.Application.StartupPath & "\Ncmr.rpt")
                    RptDoc.SetDatabaseLogon("sa", "Sa@123", gonComCompany.Server, gonComCompany.CompanyDB)
                    RptDoc.SetParameterValue("@Docnum", Docnum)
                    myCrystalReportViewer.rptViewer.ReportSource = RptDoc

thanks regards

B.lakshmi Narayanan

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 23, 2011 at 11:27 AM


    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.