🙏 Helfen Sie jetzt mit, unser LibreOffice Forum zu erhalten! 🙏
Mit Ihrer Spende sichern Sie den Fortbestand, den Ausbau und die laufenden Kosten dieses Forums. 🌱

🍀 Jeder Beitrag zählt – vielen Dank für Ihre Unterstützung!🍀

❤️ DANKE >> << DANKE ❤️

>> Dank Ihrer Unterstützung -> Keine Werbung für alle registrierten LibreOffice-Forum User! <<
🤗 Als Dankeschön werden Sie im Forum als LO-SUPPORTER gekennzeichnet. 🤗

BaseReportExtension Support und Discussion [en,de]

Alles zur Programmierung im LibreOffice.
gogo
* LO-Experte *
Beiträge: 1081
Registriert: Sa 5. Feb 2011, 19:07

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von gogo » So 15. Jan 2017, 16:33

I think there are properties missing. SystemAbort is at the moment just called when the array that should contain the user-defined properties is empty.
to test the export, just add this property
udp_savetourl.png
udp_savetourl.png (42.9 KiB) 6312 mal betrachtet
to the file BRX_Test01.ott
g
2008 LucidL./MaverickM./WinXP LibreOffice 3.3.2 > 02/13 LinuxMint13/Xubuntu > 09/13 Debian Wheezy+LO3.5.4.2 > 01/15 Debian Jessie KDE+LO4.3.3.2/Mint17 openbox auf USB+LO4.2.8.2 > 03/16 ArchLin & LO5.1+ff > 02/18 Kubuntu

Benutzeravatar
charlie.it
Beiträge: 14
Registriert: Sa 7. Jan 2017, 07:56

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von charlie.it » So 15. Jan 2017, 16:45

You're right, I had just discovered it myself. But, perhaps, it is necessary to modify the quick reference ….
Thanks.
LibreOffice 4.3.7
Mac OSX 10.7.5

gogo
* LO-Experte *
Beiträge: 1081
Registriert: Sa 5. Feb 2011, 19:07

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von gogo » So 15. Jan 2017, 17:04

the code of the extension has to be modified too. There's no problem if you either start from within a saved document or if a path is submitted in brx.savetourl (e.g.: "/tmp/Report2.pdf"). But if you start the report from within a not saved doc and there's no path supplied the extension can not find a location to save the pdf - unfotunately: if you open an ott-document, you allways have a unsaved doc ...
g
2008 LucidL./MaverickM./WinXP LibreOffice 3.3.2 > 02/13 LinuxMint13/Xubuntu > 09/13 Debian Wheezy+LO3.5.4.2 > 01/15 Debian Jessie KDE+LO4.3.3.2/Mint17 openbox auf USB+LO4.2.8.2 > 03/16 ArchLin & LO5.1+ff > 02/18 Kubuntu

Benutzeravatar
charlie.it
Beiträge: 14
Registriert: Sa 7. Jan 2017, 07:56

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von charlie.it » Mo 16. Jan 2017, 08:52

I attach a new corrected version of the quick_reference in Italian:
guida_rapida_basereportextension.odt
(483.3 KiB) 320-mal heruntergeladen
I also tried the "brx.pdfviewer" property but it does not work in Mac OSX with the default program "Anteprima" (with or without path).
Schermata 01-2457770 alle 08.45.15.png
Schermata 01-2457770 alle 08.45.15.png (44.07 KiB) 6300 mal betrachtet
LibreOffice 4.3.7
Mac OSX 10.7.5

gogo
* LO-Experte *
Beiträge: 1081
Registriert: Sa 5. Feb 2011, 19:07

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von gogo » Mo 16. Jan 2017, 09:42

I think "Users/Applications/Anteprima" is not a valid commad on Mac. Try

Code: Alles auswählen

which anteprima
or 
which Anteprima
to get the right path - at least on Linux this will work - Macs should be similar

If you got the command, try it inside the extension. The viewer is called by the BASIC-"shell"-command. If it doesn't work you can test different commands like this:

Code: Alles auswählen

shell("/command/that/launches/Anteprima",,"/path/to/your/pdf",false)
ps: maybe Macs are cASe sESNitIVe?

thx for the update, but atm it's not possible to upload pdfs, odts or other documentation on the extensions homepage...
g
2008 LucidL./MaverickM./WinXP LibreOffice 3.3.2 > 02/13 LinuxMint13/Xubuntu > 09/13 Debian Wheezy+LO3.5.4.2 > 01/15 Debian Jessie KDE+LO4.3.3.2/Mint17 openbox auf USB+LO4.2.8.2 > 03/16 ArchLin & LO5.1+ff > 02/18 Kubuntu

Benutzeravatar
charlie.it
Beiträge: 14
Registriert: Sa 7. Jan 2017, 07:56

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von charlie.it » Mo 16. Jan 2017, 17:10

Found trying and trying, the right command for OSX is:

Code: Alles auswählen

open -a Preview
Where "Preview" is the name of the app for Italian application "Anteprima".
To the next time ...
LibreOffice 4.3.7
Mac OSX 10.7.5

dmaths
Beiträge: 1
Registriert: Mo 28. Nov 2016, 16:48

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von dmaths » Di 17. Jan 2017, 12:26

Hi, I use a button in a form of my basefile, and enter the name of the myreport.ott-file without path, because it is in the same directory as mybasefile.odb.
It produces the following error:

file:///C:/Users/myname/Desktop/mydir/mybasefile.odb\myreport.ott NICHT gefunden!

i.e. BRX adds the name of the mybasefile.odb to the path, as if it was a subdirectory -
plus a funny mix of / and \...

gogo
* LO-Experte *
Beiträge: 1081
Registriert: Sa 5. Feb 2011, 19:07

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von gogo » Mi 18. Jan 2017, 09:36

The LO-Macro "DirectoryNameoutofPath()" of the "tools" library requires path and separartor. BRX provides "\" on Win-Systems and "/" on all other operating systems ... unfortuantely you have to use "/" on Win-Systems too - I don't know if this was intended by the programmer of DirectoryNameoutofPath(). The bug is removed in brx v 0.1.1, which is not released so far, because I can not supply any documentation-files on the extensions-libreoffice-homepage at the moment. (if I release 0.1.1, the doc-files for 0.1.0 will not be shown any more which makes the extension unusable)

If you use the full path, the extension will work.

To have a way around:
BRX supports multiple paths, separated by ";" - so you can use one Button for Win, Linux and Macs - BRX simply uses the first file that can be found:
"C:\Files\MyTemplate.ott;/mnt/N/Reporttemplates/MyTemplate.ott;MyTemplate.ott"

Will work for Win-Systems where there's a C:\Files\MyTemplate.ott, for Linux-Systems where tehre's a /mnt/N/Reporttemplates/MyTemplate.ott, and with BRX v 0.1.1 for all systems where the ott-file is in the same directory as the odb...
g
2008 LucidL./MaverickM./WinXP LibreOffice 3.3.2 > 02/13 LinuxMint13/Xubuntu > 09/13 Debian Wheezy+LO3.5.4.2 > 01/15 Debian Jessie KDE+LO4.3.3.2/Mint17 openbox auf USB+LO4.2.8.2 > 03/16 ArchLin & LO5.1+ff > 02/18 Kubuntu

Benutzeravatar
charlie.it
Beiträge: 14
Registriert: Sa 7. Jan 2017, 07:56

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von charlie.it » Do 19. Jan 2017, 18:49

Ciao,
I'm here again.
in the new example that I attached, there are two problems:
  1. The decimal point is always a point (.) instead of a comma (,) like Italian setup. Both formatting the numbers of the table "#. ###, 00" and "#, ###. 00"
  2. The calculated fields in a a query (showing 2 decimal places) are with 4 decimal in the report although formatted in the manner described above.
Can you solve? Thanks.
Dateianhänge
Test.zip
(17.68 KiB) 290-mal heruntergeladen
LibreOffice 4.3.7
Mac OSX 10.7.5

gogo
* LO-Experte *
Beiträge: 1081
Registriert: Sa 5. Feb 2011, 19:07

Re: BaseReportExtension Support und Discussion [en,de]

Beitrag von gogo » Do 19. Jan 2017, 21:51

hi charlie,

there's at the moment no support for conversion of types - and I think there will never be one (because this would be a never-ending-story).

You've to format almost everything inside your query (which by the way gives you full control what is shown in the report).

Code: Alles auswählen

SELECT "ID", "Price", "Price" * 1.234 "Tot" FROM "Table1" AS "Table1"
should be

Code: Alles auswählen

SELECT "ID", "Price", REPLACE( "Price" * 1.234, '.', ',' ) "Tot" FROM "Table1" AS "Table1"
If you need currency,:

Code: Alles auswählen

SELECT "ID", "Price", '€ ' || REPLACE( "Price" * 1.234, '.', ',' ) "Tot" FROM "Table1" AS "Table1"
Then even calculations will work!
g
2008 LucidL./MaverickM./WinXP LibreOffice 3.3.2 > 02/13 LinuxMint13/Xubuntu > 09/13 Debian Wheezy+LO3.5.4.2 > 01/15 Debian Jessie KDE+LO4.3.3.2/Mint17 openbox auf USB+LO4.2.8.2 > 03/16 ArchLin & LO5.1+ff > 02/18 Kubuntu


An alle, die das LibreOffice-Forum gern nutzen und unterstützen wollen:


Bitte helfen Sie uns mit 7 Euro pro Monat.
Durch Ihren Beitrag tragen Sie dazu bei, unsere laufenden Kosten für die kommenden Monate zu decken.
Unkompliziert per Kreditkarte oder PayPal.
Als ein kleines Dankeschön werden Sie im LO-Forum als SUPPORTER gekennzeichnet.



Antworten