On Fri, Jan 16, 2009 at 11:22 AM, Fernand Vanrie <s...@pmgroup.be> wrote:

> I am still strugling to get some simple Reports from a Base document with a
> ODBC connection to a MSQL server
>
> To avoid format bugs (like timestamps etc...) i tried to prepare in OO a
> query to run a report. Using this query to build a Report works OK but as
> soon I use a simple grouping  I run in a error when building the Report.
> I suppose that SBR has troubles to intrepret the SQLor the fieldnames in
> the OO-made-Query.
> Then i made a view on the MSQL server and now the Report is build an Run
> like a charm :-)
>
> Hello Fernand,
>From your description I would suspect that the problem is with your column
names in the result set.
Try opening your query and ensure that you have created aliases for any
returned column that uses a function.
ie.
SELECT AVERGE( "FIELD" ), COUNT( "FIELD") FROM "TABLE" GROUP BY "FIELD"
Instead try:
SELECT AVERGE( "FIELD" ) AS "AVG" , COUNT( "FIELD") AS "CNT" FROM
"TABLE" GROUP BY "FIELD"
Of course using the Query Designer you do this by adding the Alias in the
cell just below the field selection.
I would be surprised if this does not clear up your problems.
HTH
Drew

Reply via email to