How to customize the file name to export custom reports

Run Dry report file by way of TAG label release, export EXCEL, word, PDF file name of the default file a report with the same name, for example, report file named gcxmsyqk.rpx, so when this report is exported excel file name is gcxmsyqk.xlsx.

If you need to use other rules to name the exported results file name, such as export "gcxmsyqk.rpx" outcome document as "project earnings statistical reports (quarterly cost analysis report compiled by persons responsible for providing) .xlsx" - Run dry statements to achieve it? How to achieve it?

Run Dry statements of course, can be achieved! Use dry-run "saveAsName" property of the report provided html tags, you can specify the report saved as EXCEL, file name when the PDF. If you do not specify this attribute, then the default file name will use the report to name the exported file.

Take own showReport.jsp for example, we look at this set of tags:

According to the above settings after we set up the tab, and then export the EXCEL file page, you can see the default file name is the file name we specify.

showReport.jsp is built under a common dry-run Designer page, simply by passing parameters by rpx showReport.jsp url to access and report file name, you can show the corresponding export reports. After setting saveAsName in the fixed string, all report files will use the fixed file name when exporting the resulting file. This way, this seems not so common a JSP ...... In fact, saveAsName and report files can also be the name of the same variable is passed by Oh! If you define a variable saveName before use, then you can transfer the same file name as the report export file name parameter, oh!

Further, if a customer wants the contents of each report in the header row as a result of the name of the exported file, that we can not get a cell content directly in the JS script, then the content of this variable is set to it? Unfortunately, this can not, we need to read the report with API code, taken from the contents of the corresponding lattice, the content assigned to the variable, then the value of this variable can only be given saveAsName

Guess you like

Origin www.cnblogs.com/shiGuangShiYi/p/12116080.html