SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

Feature Request: Make UI5 controls more print-friendly #2629

Open pubmikeb opened 5 years ago

pubmikeb commented 5 years ago

SAPUI5/OpenUI5 version: 1.70

Browser/version (+device/version): Chrome, Firefox

Let say, I have a long table with items, e.g.: https://openui5nightly.hana.ondemand.com/test-resources/sap/m/demokit/tutorial/worklist/07/webapp/test/mockServer.html, and I would like to get/print a PDF-report with items of this table.

Like most of the enterprise reports, such PDF should contain:

Currently, I can either print the whole page «as is» with a lot of irrelevant data (e.g., UI controllers) or try to customize the report by using standard HTML/browser approaches like document.body.innerHTML and window.print(), but these techniques don't solve the pagination issue and aren't so fast/easy-to-implement.

It would be great if UI5 data-containers (e.g. sap.m.List and sap.m.Table) will be more print-friendly by having special built-in print-friendly CSS-mode. Is it possible to implement some print-wrapper for data containers to bring printing functionality out-of-box?

stephania87 commented 5 years ago

There are dedicated products for reporting purposes, where rendering and CSS are adjusted for the purpose of having print from browser or properly generated PDF, DOCX etc format. In this case, there is a sap.m.ListBase control which may include growing functionality based on "More" button, unknown amount of columns, for Tree and grouped controls, means hidden groups of rows and columns.

If the purpose of the print is to get data, you can:

Let me know if I am missing the idea of the request. Possibly are you asking for PDF export of data?

imargulyan commented 5 years ago

In my perception export data to PDF format and ability to design PDF/XLSX reports with page header and footer, page counter, etc... is a basic request. All OPENUI developers would love to have simple report control.

pubmikeb commented 5 years ago

@stephania87, regarding "Possibly are you asking for PDF export of data?", it would be great to have an ability to export data to PDF out-of-box from any data container UI-element.

stephania87 commented 5 years ago

Forwarding to dev team (tables only) for evaluation #1980361802 Note that the team is responsible only for the table controls and there is already existing Excel export of the data bound to a table

pubmikeb commented 5 years ago

there is already existing Excel export of the data bound to a table

As far as I know, OpenUI5 contains only export to CSV via sap.ui.core.util.ExportTypeCSV, the export to real Excel file (XLSX, Office Open XML Spreadsheet format) is provided by sap.ui.export.Spreadsheet, which is available exclusively in SAPUI5. That's why I opened https://github.com/SAP/openui5/issues/2635 aswell.

Update: As of 1.73, sap.ui.core.util.ExportTypeCSV is deprecated, which means, that currently UI5 doesn't offer any single official stable way to export a content of a table to CSV/Excel.

flovogt commented 2 years ago

This issue will be covered in BLI FIORITECHP1-13991 and BLI FIORITECHP1-13992.

pubmikeb commented 6 months ago

@flovogt, is there any any update on the issue?

flovogt commented 5 months ago

@simlin any updates here?

simlin commented 5 months ago

Well, moving the sap.ui.export library or at least the Excel parts of it to OpenUI5 is still on our roadmap, but unfortunately with a low priority.