Forum > LazReport
Compilation error while installing lazreportpdfexport 0.9
tintinux:
--- Quote from: paweld on June 18, 2024, 07:09:06 pm ---Lazarus:- Main menu > packages > install / uninstall package - On the right side of the window, type in the search box: pdfexport
- select "lr_pdfexport 0.9"
- press "install package" button
- then "save and rebuild ide"
--- End quote ---
Eh, I was able to do that ! ::)
Currently, Lazarus building and project compilation are fine, but I have runtime errors.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Unable to find the component class "TfrTNPDFExport".It is not registered via RegisterClass and no lfm was found
I suppose the class TfrTNPDFExport was in the removed package, and that I should replace it everywhere by a similar one from the new package, possibly lrpdfexport.
After that, I'll have to see if the properties and behaviour are the same...
It takes a lot of time to discover and check all this when there is no reliable documentation.... >:(
tintinux:
--- Quote from: Thaddy on June 18, 2024, 07:07:50 pm ---fcl-pdf?
--- End quote ---
What do you mean ?
paweld:
With the previous component you exported the report to PDF as follows:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if frReport1.PrepareReport then frReport1.ExportTo(TFrTNPDFExportFilter, 'report.pdf');and now you need to export as below:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses lr_e_fclpdf; //... if frReport1.PrepareReport then frReport1.ExportTo(TlrPdfExportFilter, 'report.pdf'); in the project inspector you need to add a new requirement - package lr_pdfexport
tintinux:
Hi
In my projects, I don't export by code.
The exports are only created by users, clicking on a button in a preview.
The previews are obtained by
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Report.ShowReport
So, I can't make the suggested changes.
frTNPDFExport is still referenced in many .lfm files, but none used before the runtime error occurs, that's strange.
However, I'll try to remove them, but it will require a lot of work...
And, yes, I had already added the requirement to the new package.
Thanks
tintinux:
Hi
The type TfrTNPDFExport was present in many .lfm files, all using a frame where an object of this type was present. I think it was required with previous versions to allow export from the report preview.
Now I have changed TfrTNPDFExport to TlrPDFExport in every source file (.lfm .pas .lpr), and checked the string TfrTNPDFExport is no more present in any file.
Compilation and linking are OK.
But at runtime, there is still the same error : Unable to find the component class "TfrTNPDFExport"
It is called by InitLazResourceComponent in lresources.pp line 364 [I'm using Lazarus 3.4]
My question is how can I find out why this class is tried to be loaded.
Thanks
Navigation
[0] Message Index
[#] Next page
[*] Previous page