Error: Cannot read empty file error

 

Possible reasons and respective solutions:

  • The Template Name of the Record Action does not match with the one uploaded to the ownERP FastReport API

Check if the Template Name specified in the Report Action Record matches the name uploaded in the ownERP FastReport API. This name should be unique for each Report Action and Model. Find here a graphic example:

  • The fields selected for the ReportAction records make references to the same model or circular reference

Avoid selecting fields that make circular references, because this will make the database unable to be created. Example:

  • The Template Report file (.frx) uploaded to the ownERP FastReport API is not compatible with the database or there is no database uploaded.

If neither of the solutions mentioned worked, it's possible that the Report Template file (.frx) is trying to access to fields that are not in the database, or that there is no database uploaded to the API.

To check if the database has been uploaded to the API, go to the ownERP FastReport UI and sort the uploaded files by ‘Modification date’. Then check if the last file is .db3 format and that the date and names match the last time the FastReport was tried to print.

If the database file is there then the problem should be in the Report Template. Check if the fields used in the Report Template (.frx) file are present in the database file and the database is correctly used. You can try erasing the database connection and create a new one with the updated database file. Find the steps to Add new database in eQ ReportDesigner here.

If the database is not there, then the problem is that the database has not been uploaded to the API. This can be because of a bad definition in the fields and relations to the specific report or because the API module is not installed (SQLite FastReport Module).

 

  • Other options:

If none of the options above solve the problem, it’s also possible to remove the try, except code from the method execute_report() from the class EqFastReportSQL. This will help you to debug and see where comes the error from.

 

Back to parent menu