Hi Drew,

Thanks for the suggestion; unfortunately it didn't work. I tried setting the Analyze SQL to No on the original query, and with your version with all fields aliased, but in both cases, it was unable to show a list of fields from the query. However, I am able to open either version of the query and see the records I expect.

I'll also try the other mailing list and web forum you suggested.

Thanks again!

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> /

Drew Jensen wrote:
Peter Dow wrote:
Hi Michael,

Thanks for the suggestion. It occurred to me to try creating the report without the extension, using the OO wizard instead, and that got an error stating it could not retrieve the fields from my query. However, I can open the query and see the records I expected; the only "unusual" thing about the query is an expression to concatenate last name & first name:

SELECT Classes.ClassName,
      Parents.LastName + ', ' + Parents.FirstName as ParentName,
      Parents.ID,
      Parents.SSNo
 FROM Children, Classes, Parents
WHERE Children.ClassId = Classes.ID
  AND Parents.ID = Children.ParentID
      and  ClassName <> 'Alumni'
      and ClassName<>'Inactive'
      and ClassName<>'Waiting List'
ORDER BY 1,2,3

I tried changing the expression to just a field name, i.e. Parents.LastName," and now the OO report wizard and the Sun Report Builder extension can see the field names, and the report is generated without errors.

So there appears to be a problem with the reports and expressions in a SELECT statement.


Here is something else to try - first slight change to the query

SELECT Classes.ClassName as ClassName,
       Parents.LastName + ', ' + Parents.FirstName as ParentName,
       Parents.ID as ID,
       Parents.SSNo as SSNo
  FROM Children, Classes, Parents
 WHERE Children.ClassId = Classes.ID
   AND Parents.ID = Children.ParentID
       and  ClassName <> 'Alumni'
       and ClassName<>'Inactive'
       and ClassName<>'Waiting List'
 ORDER BY 1,2,3


Now back in the SRB (Sun Report Builder) select the report wide properties Edit>Select Report
switch to the data tab
set the property 'Analyze SQL command' to NO

See if that doesn't clean it up for you. ( You may not have to actually alias each of those result set columns, it is kind of a rule of thumb for me when am going to set that property to NO )

HTH

Drew

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to