In the Siemens 1500 series and Beckhoff TwinCat3.1 you can use our function blocks to store data from the PLC into the user defined tables.
In the configuration, you define the name of the table and which fields the table has. You can create any table with different fields. There are almost no limits.
After defining and filling the table with data from the PLC, you can query it using SQL statements (queries) and display it in your own reports.