Folks,

I am repeating my question here as obviously it stands as a problem for me
now and either:
1. it cannot be solved by current OJB implementation
2. there is a solution I don't know about

How can I specify expressions in OJB report query?

F.e. I am making a report that as a column should produce addition of two
table columns :

qry.setColumns(
                        new String[] {
                                "materialVariance + laborVariance"
                        }

materialVariance and laborVariance are defined as field names in OJB
repository, unfortunately this code doesn't work as OJB failes to make a
mapping to actual table column names in SQL generation and makes SQL like:

SELECT materialVariance + laborVariance FROM ....

And of course there are no such columns in database table,
Now I am forced to make substitution and instead of field names include
column names in OJB query:

qry.setColumns(
                        new String[] {
                                "MATVAR + LABVAR"
                        }

Which is evidently a bad way of using OJB that is increasing future
maintenance. I am using RC4. 

Please tell me if there is or there is no solution for this problem in OJB
as it looks like limitation for me,

Thank you,
-Sergey




**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain 
legally privileged, confidential or proprietary 
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of 
this message to the intended recipient(s), you are 
hereby notified that any dissemination, distribution 
or copying of this E-mail message is strictly 
prohibited. If you have received this message in 
error, please immediately notify the sender and 
delete this E-mail message from your computer.

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

Reply via email to