Triggering reports from html files

Hello!

I have developed an application using libreoffice base. I navigate to all
the forms from an html5 document. Here's my problem:

I've created some reports using report builder, but cannot trigger the
generation of a dynamic report from the html file. All my research points to
the impossibility of externally accessing the dynamic reports, but I am
hoping it is lack of knowledge that is turning up these research results.
Can anyone enlighten me on this?

I resorted to using forms to produce a dynamic data grid. This could work,
but only if its possible to make it more presentable, instead of looking
like a table.

My whole project hinges on getting presentable dynamic reports to work.

Can someone point me in the right direction?

Thank you!

Beth

Base reports are either text documents or spreadsheets. But you
might be able to use Writer to create an HTML document with the
formating you want. Using the Data Source window (use the F4 key to open
it), you should be able to drag the fields from this window down to
where you want the fields to be in the HTML document. You may have to
modify the HTML in the document. I've not tried this, but it is a
possibility.

--Dan

Thanks for the reply, Dan,

It's not that I want the report to be displayed in an html file, rather,
I'd like to be able to make an href call to open a dynamic report to
display in an .odt file.

Any thoughts, now that I've clarified?

Beth

Thanks for the reply, Dan,

It's not that I want the report to be displayed in an html file, rather,
I'd like to be able to make an href call to open a dynamic report to
display in an .odt file.

A report is a preformated .odt file who is on opening filed with information from your Database, i suppose you need a solution to "run" the report from in a Webapp ?
please give us a bit more info on how things happen.
You can use the api and "run" a report with "LoadFrom Url(.....)
Maybe you can start from viewing the code who is in a LO-extension named "reportrunner"
Hope it helps

Fernand

Hello!

I have developed an application using libreoffice base. I navigate to all
the forms from an html5 document. Here's my problem:

I've created some reports using report builder, but cannot trigger the
generation of a dynamic report from the html file. All my research points to
the impossibility of externally accessing the dynamic reports, but I am
hoping it is lack of knowledge that is turning up these research results.
Can anyone enlighten me on this?

Pretty much - you can programmatically run a report using any of the
supported scripting languages, but it requires you to load the ODB file
(can be hidden) and then opening (running) the dynamic report, the
script can save that, or export it, or whatever you like, but yes you
are running a script from within the LibreOffice runtime.

Does that help any? I rather think not, at least if I understand what
you are doing here correctly.

best wishes,

//drew

Hi Drew,

Thanks for your reply.

Part of my problem is the "hidden" URL to run the report - can you advise me
as to how to determine what the URL might be?

Beth

Hi Fernand,

Thanks for the reply.

It appears reportrunner may no longer be available

http://extensions.services.openoffice.org/project/reportrunner

but I will continue a search for it.

I am using an html5 document as my main navigator for access to reports and
forms.

Part of the problem is I don't understand how to determine what the URL path
would be to a report. I will review the literature on the API to see if I
can find anything.

Can you shed light on this?

Beth

Hi Fernand,

Thanks for the reply.

It appears reportrunner may no longer be available

http://extensions.services.openoffice.org/project/reportrunner

Right - that posting was removed, was supposed to be anyway.

//drew

So does report runner exist anymore?

How do I find the path to the report within base - seems if I can use open
or href to open it, I could run it. I may be getting in way over my head and
unfortunately my time is limited. What would you recommend?

So does report runner exist anymore?

Well, I haven't even looked at it for a long time - it is just basic
macro script. It had a way of leaving the java virtual machine still
running in memory, when I thought it should not, then I lost a disk and
never quite got back to redoing the last bit of lost work..and that is
why I stopped working with it - blah blah blah,..

so just looked I do have a copy on a disk (from 2008)
- tried an install with Libo 3.4.4, ok that worked
- the toolbar is there
- the toolbutton launches the dialog
- it lists all the databases registered in the Libo user instance
- but it doesn't list any reports.

.. still, I'll send this to you directly (the .oxt is attached)
if you install the oxt as you would any extension, then the basic
library is available as exportReport and you want to look at the
function openReport.

The issue isn't the URl or URI as a string, it is asking the proper
container object to open if for you - in this case the container is the
Reports list contained within an ODB file. (otherwise is is analogous to
opening any document from the libreoffice desktop object)

I'll look at it later and see about why that list of reports isn't
displaying. In the mean time the basic script engine is best as just a
window to the published API[1] (application progamming interface) and if
you take the time to familarize yourself with that you can do quite a
bit. It is also possible to call a specific script from an OS command
line (of GUI script?) but you must of course include a full running copy
of libreoffice to do so..

[1] http://api.libreoffice.org/

Awesome! Thank you, Drew!

I don't see the attachment, just a link to the API site...

I'd be happy to familiarize myself with it. It would definitely be helpful
to many!

Beth

Sweet! It's listing the reports in my app :slight_smile:

Thanks so much!

We'll keep you posted...

I think I'm going to try putting a button on my data entry form that runs
the specific report.

Yey!

Beth

Hi :slight_smile:

I'm so excited to have this working!

I created a button, added an event - execute action, selected the mdlMngDlg
->> ShowRunReportDialog, but got an error - wrong number of paramaters.

Any tips?

blesko ,
"wrong number of paramaters" can be : your event do not transfers the parameters to the function or Sub you trie to run
"ShowRunReportDialog"

DBName, ReportName, ExportFileName, Action, AsPdf

I think you need to "read" the code and pick the stuff you need to make your application running

Greetz

Fernand

Good idea, Fernand :slight_smile: Will do.

How do I change the database for ReportRuner? The drop down only shows
bibliography.

How do I change the database for ReportRuner? The drop down only shows
bibliography.

hmm - don't know.

Do you mind if I send you an update directly?

//drew

Hi Drew :slight_smile:

Jeff has the one you sent me - we're working on the project together.

He has it working now, too.

Thanks!

Beth

I edited mdlExecReport and added a function OpenAllergyReport, which is a
duplicate of OpenReport().

This works when I access the macro from the toolbar - in both the DB object
and an exported .odt form (where I hoped to put the button). It's throwing
one error for line 305 (not optional??), but it still opens the report :slight_smile:

But I cannot run it from the button. I may be configuring the button
incorrectly. On the General tab, I have Action : none, then on the events
tab I have Execute Action mdlExecReport-mdlOpenAllergyReport. If not, maybe
a button isn't the way to go?

Any suggestions?

Encouraged!

Beth

I edited mdlExecReport and added a function OpenAllergyReport, which is a
duplicate of OpenReport().

maybe you must rename your new function to "OpenReport"

This works when I access the macro from the toolbar - in both the DB object
and an exported .odt form (where I hoped to put the button). It's throwing
one error for line 305 (not optional??), but it still opens the report :slight_smile:

"not optional" means there is a parameter missing when calling the function

But I cannot run it from the button. I may be configuring the button
incorrectly. On the General tab, I have Action : none, then on the events
tab I have Execute Action mdlExecReport-mdlOpenAllergyReport. If not, maybe
a button isn't the way to go?

trie first to use the original button with a renamed function and i hav my doubt about "mdl"OpenAllergyReport because tour new function is named

"OpenAllergyReport" and not "mdlOpenAllergyReport"

greetz

Fernand