on 09-25-2008 6:13 PM
What is the correct way to call a report that was in a different form?
This is my current code
Dim frmImprimeComprobante As New AdvancedReports.frm_RptRecepMerc
frmImprimeComprobante.ShowDialog()
frmImprimeComprobante.CrystalReportViewer1.SelectionFormula = "{tbRecepcionEnc.fdRecepcion} =" & 26 & "" & _
" and {tbRecepcionEnc.fdCodigoProveedor} =" & 4 & "" & _
" and {tbRecepcionEnc.fdCodigoMovimiento} =" & 1 & ""
frmImprimeComprobante.CrystalReportViewer1.ReportSource = "
AdvancedReports\AdvancedReports\RptRecepMerc.rpt"
frmImprimeComprobante.CrystalReportViewer1.RefreshReport()
But displays the following error:
Error 1 'AdvancedReports.frm_RptRecepMerc.Private Dim WithEvents CrystalReportViewer1 As CrystalDecisions.Windows.Forms.CrystalReportViewer' is not accessible in this context because it is 'Private'.
Glauco\TI Backup\Proyectos\Advanced\AdvancedDaily\AdvancedDaily\frm_Recepcion.vb 513 9 AdvancedDaily
Thanks from Costa Rica
Hi,
Basically we call the report in the form where the viewer control is placed, however in your case we can pass the report document object from a global variable or a session (in case of web application.
More over how does it behave when you try using this statement:
CrystalReportViewer1.ReportSource = "
AdvancedReports\AdvancedReports\RptRecepMerc.rpt"
Does it help?
Regards,
AG.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Declare it as public or protected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.