converting XLS to PDF

hello All,
I am using YARG to generate reports. In the cuba platform report generator has been written that one should set the path to the openoffice in the, but i can not find any information about the folder in which this file has to be put.
Would you please tell me where i need to put the properties file? Is there possible to pass the path information as parameter in some method?

This is my xml:

        <template code="DEFAULT" 

And this the related code in java class:

ReportOutputDocument reportOutputDocument = reporting.runReport(new RunParams(report), new FileOutputStream("reportOutputs/breakdown.pdf"));

I get this error after running
Could not convert xls files to pdf because Open Office connection params not set. Please check, that “cuba.reporting.openoffice.path” property is set in properties file.


If you use YARG’s Java API, you should setup the connection to Open Office programmatically.
You can do it with setOfficeIntegration method of the DefaultFormatterFactory class.

        DefaultFormatterFactory defaultFormatterFactory = new DefaultFormatterFactory();
        defaultFormatterFactory.setOfficeIntegration(new OfficeIntegration(openOfficePath, 8100));

The openOfficePath parameter should point to program directory of the Open Office installation.
If you use Windows it would be like the following: “C:/Program Files (x86)/ 3/program”.

1 Like