on 08-28-2009 6:57 AM
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
Hi,
Send the parameters also in code..
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.