Am 01.05.2012 00:35, Richard Quadling wrote:
Perfect. At least now I can get data into a spreadsheet.
Next I need to work out calling stored procedures and passing user
parameters to the SP as well as automated updating (on open and on
parameter changing).
These are probably macro based rather than UI.
Hopefully.
Thank you for your reply though. Very useful.
I know at least 3 methods.
1) Simple method:
Add a parameter query to the "Base document":
SELECT * FROM "Table" WHERE "A" = :param_A AND "Date" BETWEEN :From_Date
AND :Until_Date
Named parameters are unquoted alphanumeric and start with a colon.
Drag that query into your sheet.
When you access/refresh the parameter query you will be prompted for
substitution.
2) Add a small filter table to the database, add a criteria input form
to the spreadsheet and bind it to one particular record of the filter
table.
The user enters the criteria into the form and refreshes the import
range which is bound to:
SELECT "D".* FROM "Data" AS "D", "Filter"AS "F" WHERE "Filter"."RowID"=0
AND "D"."A" = "F"."INT_A" AND "D"."Date" BETWEEN "F"."D1" AND "F"."D2"
3) A generic macro of mine which binds an import range to a changing SQL
string (not possible in the GUI). For simplicity and better
customization the macro reads the SQL from a named cell.
http://user.services.openoffice.org/en/forum/viewtopic.php?t=1645&p=6847#p6847
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted