General information
Title:
Expression in View Designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only