Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Expression in View Designer
Message
From
17/03/1999 18:54:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Expression in View Designer
Miscellaneous
Thread ID:
00198971
Message ID:
00198971
Views:
70
Hello everyone:

I need a little guidance concerning an expression I am building in a view. I am trying to create a view to put into my orders table as a grid. However, before I can do that, I need to create the view in the view designer.

I have called two tables in my view designer to make this happen:
Products
Orders Detail

I want the grid in my orders table to eventually have the following columns:

ProductName UnitPrice Quantity Discount Extended Price

After I get the desired number in the extended price, I will create some text boxes below the grid that handle subtotal, freight, and total cost.

However, before I can get there, I must create my view. I hope this is enough backup information.

* I am trying to create an expression for the "extended price column". I want to multiply unit price x quantity - discount to get my extended price.

therefore, I created the following expression, and I would like to know if this is the correct syntax. The reason I am asking is because after I created what I am about to show everyone, I ran the view and in the column for the extended price, it just displayed the expression (and the column name was Exp_7, not extended price as I thought I had named it). Point being, it didn't perform the math.

Here is my expression:

(ordersdetail.unitprice*ordersdetail.quantity)- [(ordersdetail.unitprice*ordersdetail.quantity)*ordersdetail.discount] AS Extended Price



Note: my discount is not set up with a percent. It is a straight number(.34 for example). I couldn't figure out how to do that when I set my table up.

One last thing> the unitprice field is currency, the quantity field is numeric, and the discount field is numeric.


Thanks for the assistance in advance

Jason
Next
Reply
Map
View

Click here to load this message in the networking platform