Hi everyone,
I want to create an excel using the report with the functions Context.createOutputObject() and WriteReport().
Actually it works now in report. But If I use Macro to execute the report, the excel file won't be generated.
There is no error message and the Macro is certainly correct. I have no idea why I can't get the excel file.
Also I used the same functions in other report but in that new report it also doesn't work. No error message but no output file.
Could anyone give some suggestions? What problems could it have when I want create an excel file? Thanks in advance.
I don't exactly know what your Macro looks like, but if you would use the correct methods in the Macro there shouldn't be a need to explicitly call .setSelectedFormat(...) and .setSelectedFile(...).
Does your Macro use a function called createExecInfo(...) to prepare the report execution? There are different versions of this method available, some with more parameters and other with less parameters. Use one of those functions that specifies the output format, output path and output file name, and there shouldn't be any difference between manually starting the report and letting the macro start the report.