antonscheffer / APEX2XLSX

Oracle APEX plugin to export a report to Excel xlsx
MIT License
8 stars 5 forks source link

No file created #3

Closed p3t3r closed 5 years ago

p3t3r commented 5 years ago

Tried the plugin on an interactive grid, but there is no export file created. I can see in the debug the process plugin is executed succesfully, but there is no file created.

antonscheffer commented 5 years ago

If you enable the APEX debug mode the plugin should return a log of its operation instead of the xlsx-file, but even that only works if the plugin is really executed. Are you sure that the plugin is executed at process point "Before Header"

p3t3r commented 5 years ago

That was it, before header.

Now i'm getting this error (nb. it's a large report with lots of columns). Starting at 02-11-2018 11:35:26 owner: ... Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production APEX 5.1.4.00.08 APEX to XLSX version 0.800 DUTCH_THE NETHERLANDS.WE8MSWIN1252 APX50;APX50;SYS$USERS;an00s232 installed on: 20181016113815 num1: 4FF2-6344-67FF-F9A8 num2: F91F-8E38-52EE-495C no licence key provided 785650297B9F59E7E053E8001EAC4E01 use default template looking for report regions found Artikelen Interactive Grid NATIVE_IG trying primary report my query select ....... new sheet added ORA-00972: Identificatiesymbool is te lang.

ORA-06512: in "SYS.DBMS_SQL", regel 1199 ORA-06512: in "APEX2XLSX", regel 1885

Finished at 02-11-2018 11:35:26

antonscheffer commented 5 years ago

It would help if you can send me (by mail?) the generated "my query" from the log file

p3t3r commented 5 years ago

Thanks for the update, the ORA-00972 error is solved.

But now I run into a new issue, I have a column in the grid of type "SQL expression" and this results in the error : ORA-00904: "COLUMN1": ongeldige ID ORA-06512: in "SYS.DBMS_SQL", regel 1199 ORA-06512: in "VIRGO.APEX2XLSX", regel 1889

PS. Reinstalling the plugin does not recreate the SQL function, so I have to remove the function manually.

antonscheffer commented 5 years ago

If have extended the function to handle that too. And changed the plugin to reinstall the function when a higher version of the plugin is installed (and run again afterwards)

p3t3r commented 5 years ago

Thanks, both are working. Still have one issue with the solution,but not sure if this is an issue specific for me. It uses the column name from the report as the query alias for the SQL expression. But this column is also a DB column, resulting in a ORA-00918 column ambiguously defined. The reason is that I changed the db column to a SQL expression. In my opinion not an unrealistic scenario to do.

Also I'm wondering how to implement the "Before header" proces on my page. If I use a button condition it fires always. If I use a Request condition it never fires.

antonscheffer commented 5 years ago

I always use Request condition

2018-11-09_15-29-50

But make sure that your button is making a request, that value is quite "hidden", at the bottom of the "Target" popup

2018-11-09_15-34-47

p3t3r commented 5 years ago

Thanks for the explanation. I was doing a submit, not a redirect.

Now only have the issue of the "ORA-00918 column ambiguously defined.". Probably can work around it, but like said before, seems like something other people can run into quite easily.

antonscheffer commented 5 years ago

I disagree, using a SQL-expression doesn't seem to be used that much, and certainly not giving that SQL-expression the same name (id) as an existing column. But besides that (disagreement), that issue is fixed too.

p3t3r commented 5 years ago

Thanks, issue solved.