You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Manukyan, Sergey" <SM...@lear.com> on 2004/03/18 16:15:02 UTC

OJB report query

Folks,

How can I specify expressions in OJB report query?
I want it to select not a column but the sum of several columns,
The code here doesn't work, it failes to recognize the names of
field-descriptors. I use RC4.

Thank you,
-Sergey

---------


		ReportQueryByCriteria qry =
			QueryFactory.newReportQuery(PartQuote.class,
criteria);

		qry.addOrderByAscending("partNum");
		qry.setColumns(
			new String[] {
				"partNum",
				"part.partDescription",
				"supplierReviewedQuote",
				"materialVariance + laborVariance +
burdenVariance + sellGenAdminVariance + profitVariance + toolingVariance +
packagingVariance + freightVariance + editVariance",
				"annualVolume",
				"supplierDeclinedQuote",
				"toolingRequired" });

		Collection report =
	
OJBBeanManager.getInstance().getReportByQuery(PartQuote.class, qry);

**********************
** 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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org