Help with Parameter
Hello, I have the following problem in parameter passing.
By lead If I like this, the parameters are passed korekt.
FaRe.RegisterData(ds)
FaRe.SetParameterValue("ReportTitel", "Bestellungen 2014")
FaRe.SetParameterValue("ReportTitelSub", "Alle Bestellungen > 0, Aller Lieferanten")
Fare.show()
When I use the parameter with a function, or as a global variable FastReport. If no parameters are given.
Dim FaRe As New FastReport.Report
FaRe.RegisterData(ds)
FaRe.SetParameterValue("ReportTitel", "Bestellungen 2014")
FaRe.SetParameterValue("ReportTitelSub", "Alle Bestellungen > 0, Aller Lieferanten")
Call gFnc_FormOpen_frmPrintView(FaRe, "rpt_Bestellliste_LiefAll_Detail.frx", "", "")
The Function for FormOpen:
Public Sub gFnc_FormOpen_frmPrintView(ByVal FaRe As FastReport.Report, ByVal ReportFilename As String, Optional BestID As String = "", Optional parPrint As String = "")
Dim frm As New frm_PrintView
frm.fFaRe = FaRe
frm.fReportFileName = ReportFilename
frm.fBestID = BestID
frm.fParPrint = parPrint
frm.ShowDialog()
frm = Nothing
End Sub
The Form with ViewerControl
Public Class frm_PrintView
Public fFaRe As FastReport.Report
Public fReportFileName As String
Public fBestID As String
Public fParPrint As String
----
Private Sub frm_PrintView_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
gSendDruckOk = False
FastReport.Utils.Res.LoadLocale(mPathAPP & "\Report\German.frl")
With gFaRe
.Load(mPathAPP & "\Report\" & fReportFileName)
.Preview = Me.ViewControl
If My.Computer.Keyboard.CtrlKeyDown = True Then
.Design()
Else
.Show()
.Preview.ZoomWholePage()
End If
End With
End Sub
What am I doing wrong Thanks for your help.
lg
Kaiser930
By lead If I like this, the parameters are passed korekt.
FaRe.RegisterData(ds)
FaRe.SetParameterValue("ReportTitel", "Bestellungen 2014")
FaRe.SetParameterValue("ReportTitelSub", "Alle Bestellungen > 0, Aller Lieferanten")
Fare.show()
When I use the parameter with a function, or as a global variable FastReport. If no parameters are given.
Dim FaRe As New FastReport.Report
FaRe.RegisterData(ds)
FaRe.SetParameterValue("ReportTitel", "Bestellungen 2014")
FaRe.SetParameterValue("ReportTitelSub", "Alle Bestellungen > 0, Aller Lieferanten")
Call gFnc_FormOpen_frmPrintView(FaRe, "rpt_Bestellliste_LiefAll_Detail.frx", "", "")
The Function for FormOpen:
Public Sub gFnc_FormOpen_frmPrintView(ByVal FaRe As FastReport.Report, ByVal ReportFilename As String, Optional BestID As String = "", Optional parPrint As String = "")
Dim frm As New frm_PrintView
frm.fFaRe = FaRe
frm.fReportFileName = ReportFilename
frm.fBestID = BestID
frm.fParPrint = parPrint
frm.ShowDialog()
frm = Nothing
End Sub
The Form with ViewerControl
Public Class frm_PrintView
Public fFaRe As FastReport.Report
Public fReportFileName As String
Public fBestID As String
Public fParPrint As String
----
Private Sub frm_PrintView_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
gSendDruckOk = False
FastReport.Utils.Res.LoadLocale(mPathAPP & "\Report\German.frl")
With gFaRe
.Load(mPathAPP & "\Report\" & fReportFileName)
.Preview = Me.ViewControl
If My.Computer.Keyboard.CtrlKeyDown = True Then
.Design()
Else
.Show()
.Preview.ZoomWholePage()
End If
End With
End Sub
What am I doing wrong Thanks for your help.
lg
Kaiser930