reportlite_export()

Read(573) Label: export , pdf, docx, xlsx, xls, html, mht, rptr,

Description:

Export a ReportLite(group) file.

Syntax:

reportlite_export(rpt, filePath)

Note:

The external library function (See ReportLite User Reference) exports the report as a pdf, docx, xlsx/xls, html/mht or rpr file; by default, it exports the report as a rpr file.

 

It supports @p, @d, @x and @h only when exporting a report group file.

Parameter:

rpt

ReportObject object

filePath

The URL through which a report is exported, which can be an absolute path or a relative path; when it is the relative path, the base directory is the path specified in the <home> node in the configuration file

Option:

@p

Export as a pdf file, paginated by default

@d

Export as a docx file

@x

Export as an xlsx file, paginated by default

@h

Export as an html file

@n

Export as a non-paginated file; need to work with @p or @x

@s

Export as an xls file; need to work with @x

@m

Export as an mht file; need to work with @h

@f

Export as an Excel file with formulas; need to work with @x or @xs

Return value:

File export path

Example:

 

A

 

1

>reportlite_config("config\\raqsoftConfigReportLite.xml")

 

2

=reportlite_open("D:\\test.rptx")

 

3

=reportlite_run(A2)

 

4

=reportlite_export@d(A2,"D:\\test.docx")

Export as test.docx.

5

=reportlite_export@d(A2,"D:\\test")

Same as above; automatically export as a docx file when the file extension is absent.

6

=reportlite_export@p(A2,"D:\\test")

Export as paginated test.pdf.

7

=reportlite_export@xn(A2,"D:\\test")

Export as non-paginated test.xlsx.

8

=reportlite_export@xsf(A2,"D:\\test")

Export as test.xls with formulas.

9

=reportlite_export@hm(A2,"D:\\test")

Export as test.mht.

10

=reportlite_export(A2,"D:\\test")

Export as test.rptr.

11

=reportlite_export@pdxh(A2,"D:\\test")

Export as a paginated test.pdf; the order of priorities of the options is @p>@d>@x>@h.

Related function:

reportlite_config()

reportlite_open()

reportlite_run()