I am trying to visualize a report in vb.net which uses as report Xtrareport
but the same I did in a separate project, when I try to pass the parameters I get this error:
Object reference not set to an instance of an object.
This is the code:
Public Sub CreateAndShowReport1(ByVal Codprestamo As String)
Dim report As XtraReport = XtraReport.FromFile("F:\J_RAMIREZ\PROYECTOS\Easy Money\Easy Money\Reportes\RptAmortizacion.repx", True)
report.Parameters("Codempresa").Value = Codempresa
report.Parameters("Codprestamo").Value = Codprestamo
Dim printTool As New ReportPrintTool(report)
printTool.ShowPreviewDialog()
End Sub