cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report open instead of PLD with same form reference.

Former Member
0 Kudos

Dear All,

I configured crystel reports to open in preview insted of PLD for documents,

but it is asking parameters of the documents to be opened coz i have created parameteries crystal report,

Means it is open whatever i have created in crystal report.

But i want to open my crystel reports on preview directly insted of PLD

with the same form reference.

Means like PLD is opening preview directly whatever number form is open.

Suppose in Sales Oreder form is open in that 5 no's Sales Order is there and then

when i click on Preview that time only 5 no's PLD Preview is open.

Like that i want to open Crystal Report.

How to get that no's reference to crystal report ?

Thnks

Harish

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Send the parameters also in code..

Vasu Natari.

Former Member
0 Kudos

Dear Vasu,

I tried following code for showing the CR instead of PLD. It is working fine.

Now in that code plz tell me how to take the same form means whatever Sales order is open that no.

Means directly open CR like PLD is open takeing the document parameter automatically which means i don't want to give any parameters from my CR.

Code is,

Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent

Try

If pVal.MenuUID = "519" And pVal.BeforeAction = True Then

Dim objFrmLabelDisplay As New Form1

objFrmLabelDisplay.WindowState = Windows.Forms.FormWindowState.Maximized

objFrmLabelDisplay.ShowDialog()

BubbleEvent = False

End If

Catch ex As Exception

End Try

End Sub

Thnks

Harish

Edited by: Harish Patil on Aug 28, 2009 8:28 AM

Former Member
0 Kudos

Hi,

U can pass the parameters as follows..

Private Sub ToLoadCrystalReport(ByVal oBPForm As SAPbouiCOM.Form)

        Dim strCrystalParam As String
        Dim objConInfo As New CrystalDecisions.Shared.ConnectionInfo
        Dim oLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo
        'Dim oTable As CrystalDecisions.CrystalReports.Engine.Table

        Dim objPL As New frmReportViewer
        rptBPStatement.Load(System.Windows.Forms.Application.StartupPath & "\Reports\rptBPstatement.rpt")

        'Test to pass params

        strCrystalParam = oBPForm.Items.Item("3").Specific.String

        rptBPStatement.SetDatabaseLogon("sa", "sa@espl", objSBOAPI.oCompany.Server, objSBOAPI.oCompany.CompanyDB)
        rptBPStatement.SetParameterValue("CUS", strCrystalParam)
        'End of test


        objPL.rptViewer.ReportSource = rptBPStatement
        objPL.rptViewer.Refresh()
        objPL.ShowDialog()
    End Sub

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Dear Vasu,

I am getting following error,

Type 'frmReportViewer' is not defined. For that we should have to add any DLL reference ?

Name 'rptBPStatement' is not declared. For that wat should we have to declare ?

thnks