Hola Angel,
(Viene movido el sábado)
AngelSalom wrote:Mi inquietud viene en lo que respecta a tReport.
Tengo un sistema de reportes muy complejo y dependiente de esa clase, por eso estaba planteándome buscar alguna solución para exportar desde el preview (solo los reportes) antes de meterme en el "fregado" de hacer una subclase de tReport para generar los PDFs. Similar a lo que tiene ahora dicha clase para exportar a Excel con el método ToExcel() que reinterpreta el informe.
I understand your concern, I it was mine too, but not as important. When i wrote the PdfPrinter I thought in TReport too, but I found TReport makes many of its decisions based on the physical printers properties, querying the operating system functions directly, so there is no way to cheat it with sth like that.
If I had to make a change, I would go for abstracting the device in TReport (like TCanvas in Delphi), pulling apart rendering issues from the logic and be centered in only one concern. In this way then we will be able to create new pseudodevices (like XLSX writers, html, pdf, etc) to handle the output.
I'm not a big fan of having big classes that make many things, hate the monsters with many heads
It turns things in 'look but don't touch'.
KR!