At 09:22 AM 1/8/2008, Jeffrey M. Watson wrote:
I have a view using a calculated column, I am trying to show the view in
a read-only db grib but I do not see the calculated column available to
be chosen for the table. I see every non-calculated column. Can I not
use a DBGrid for this task?
Jeff,
Here's how:
01. Re-Define the view with alias column names.
Example:
-- Start here ...
CONNECT RRBYW14
SET ERROR MESSAGE 677 OFF
DROP VIEW LineItemTotals
SET ERROR MESSAGE 607 ON
CREATE VIEW `LineItemTotals` +
(CustID,Company,NetAmount,Freight,Tax,LineItemTotal) +
AS SELECT +
CustID,BillToCompany,NetAmount,Freight,Tax,(NetAmount+Freight+Tax) +
FROM InvoiceHeader
COMMENT ON VIEW `LineItemTotals` IS 'Line Item Totals'
RETURN
-- End here ...
02. Now create a form with DB Grid Control associated with LineItemTotals.
Notice that all columns including the calculated column LineItemTotal
is also displayed accordingly.
And, that's all there is to it!
Have fun.
Very Best R:egards,
Razzak.