Report Builder: Data missing with "Run SQL directly"

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
newuser
Posts: 39
Joined: Sun Dec 02, 2007 11:06 am

Report Builder: Data missing with "Run SQL directly"

Post by newuser »

I'm running OOo 2.3.1 with Sun Report Builder 1.0.1 under Windows 2000, with any backend I've tried or even using the embedded HSQL engine it is impossible to retrieve data from a saved query if "Run SQL directly" has been selected in it.

Actually on my system reports come out but only graphic elements are printed on the screen (such as lines or images) while data is substituted by series of blank lines.

Can anyone else confirm this behaviour before I submit the bug?
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Report Builder: Data missing with "Run SQL directly"

Post by DrewJensen »

Using queries with Escape Processing turned off ( Run SQL Direct ) you should be sure to alias your return columns.

Give that a try and see if your problems don't go away.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
newuser
Posts: 39
Joined: Sun Dec 02, 2007 11:06 am

Re: Report Builder: Data missing with "Run SQL directly"

Post by newuser »

Thanks for your reply, I've tried with aliases but it seems to make no difference.

I've created a new database file connecting to the example file biblio.dbf installed with OOo in the directory /openoffice.org2.3/preset/database/biblio.

I've created the following query using the SQL view

Code: Select all

SELECT
  "Identifier" AS "IDENTIFIER",
  "Type" AS "TYPE",
  "Author" AS "AUTHOR"
FROM 
  "biblio" as "BIBLIO"
and I've checked the "Run Sql command directly" option. I can create a new report picking this query as data source, field names appear correctly in the "Add field" window but once the report is run I obtain only a blank page. Turning on escape processing in the same query solves the problem, unfortunately this solution doesn't support the full SQL syntax available for the backend (e.g. with SQLite I can't use the CASE instruction).

Same result if I import the table into a database which uses the embedded HSQL engine.

I will probably try to install OOo 2.4.0 for *nix to see if it makes any difference.
Post Reply