Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.
by OliverYan » Wed May 20, 2015 5:53 pm
Hi,
I'm upgrading a plugs-in from Jiwa6 to Jiwa 7. a plugs is able to generate PDF file by opening an existed report file, but I found the component and properties are changed in Jiwa 7. I have no enough document for this.
Would you please tell me how to generate PDF file from an existed report ?
Thank you very much.
Oliver
-
OliverYan
- Occasional Contributor

-
- Posts: 13
- Joined: Tue Nov 11, 2014 11:26 pm
- Topics Solved: 1
by Scott.Pearce » Thu May 21, 2015 9:38 am
Try this:
- Code: Select all
Dim PrintReportObject As New JiwaApplication.JiwaPrintReport.JiwaPrintReport
PrintReportObject.Setup()
Dim report As New JiwaApplication.Report.Configuration.Report
report.ReadRecordFromFileName("The report I want to generate - it must be in the database.rpt")
PrintReportObject.LoadReport(report)
PrintReportObject.UpdateReport()
Dim exOption As CrystalDecisions.Shared.ExportOptions = PrintReportObject.CrystalReportObject.ExportOptions
exOption.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
exOption.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
Dim tempFolderPath As String = My.Computer.FileSystem.SpecialDirectories.Temp
If tempFolderPath .Trim.Length = 0 Then
Throw New Exception("Unable to get temporary folder")
End If
Dim OutputFilename = "Output.pdf"
PrintReportObject.CrystalReportObject.ExportToDisk(ExportFormatType, My.Computer.FileSystem.CombinePath(tempFolderPath, OutputFilename))
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
-

Scott.Pearce
- Senpai

-
- Posts: 765
- Joined: Tue Feb 12, 2008 11:27 am
- Location: New South Wales, Australia
- Topics Solved: 230
-
Return to Technical and or Programming
Who is online
Users browsing this forum: No registered users and 2 guests