Base Reporting System - OpenCode/gambas-latex-report-engine GitHub Wiki
Create a report with LatexReportEngine is simple.
- Download the code from this repo
- Import the files in classes folder in your project from Gambas
- Use it!
Basic Functions:
Begin()
It's a required method used to create the basic template init for the report
ClearContent()
Reset the report content
DocumentClass(Optional paper As String = "", Optional font_size As String = "", Optional type As String = "")
It's a required method used to set and define the basic information for the report page
End()
It's a required method used to close the basic template for the report. After this method you must not use other method and now you can parsing and rendering the report.
GetContent()
Get the latex content obtained with all the methods
GetReportName()
Get the setted report name
GetReportPath()
Get the setted report path
IncludeElement(element)
Include an element in the actual template. The element is created with external class (f.e. listes, tables, etc)
InsertLatex(code As String)
Insert latex code in the template without change it. Remember to add a \ before every \ used in latex code
InsertText(text As String, Optional newline As Boolean = True)
Insert text in template. Every TExt string insert with this method is a paragraph in the the latex template.
Parsing(Optional type As String = "pdf")
Generate the final report
SetReportName(name As String)
Set the report name
SetReportPath(path As String)
Set the report path
SetTitle(Optional title As String, Optional author As String, Optional data As String)
Set the parameters to include title in the template