JiwaApplication.Report.Configuration.Report error
Posted: Wed Jun 26, 2019 2:41 pm
Hi,
I had a piece of code which emails a custom report from schedule and it works in 7.0.x
After importing to v7.2, I get null object reference error on report.ReadRecordFromFileName(ReportName)
However, if I chose to ignore it, the rest of code seems working ok.
I had a piece of code which emails a custom report from schedule and it works in 7.0.x
After importing to v7.2, I get null object reference error on report.ReadRecordFromFileName(ReportName)
However, if I chose to ignore it, the rest of code seems working ok.
- Code: Select all
Dim JiwaReport As JiwaApplication.JiwaPrintReport.JiwaPrintReport
JiwaReport = manager.BusinessLogicFactory.CreateBusinessLogic(Of JiwaApplication.JiwaPrintReport.JiwaPrintReport)(Nothing)
'JiwaReport.Setup()
Dim report As New JiwaApplication.Report.Configuration.Report()
report.Manager = manager
Try
report.ReadRecordFromFileName(ReportName)
Catch ex As Exception
'null ref error in v7.2
End Try
JiwaReport.LoadReport(report)
Dim savedrange As JiwaApplication.JiwaPrintReport.SavedReportRange = JiwaReport.SavedReportRangeCollection.GetItem("Description", SavedRangeName)
If Not savedrange Is Nothing Then
JiwaReport.ApplyXMLToRanges(savedrange.XML)
Else
Exit Sub
End If
For Each formula As JiwaApplication.JiwaPrintReport.JiwaPrintFormula In JiwaReport.JiwaPrintFormulaCollection
If formula.Name.ToUpper.Equals("PASS_DEBTOR") Then
formula.Content = candidate.AccountNo
Exit For
End If
Next
JiwaReport.UpdateReport()