Sorry,João, I tried to give an example and ended up not being clear.
Just add the 'as TotDiscount' to the end of the expression text. What I tried to say is that the SQL of the View will have the syntax I wrote in my message. You shouldn't add that code to your view.
Barbara
>Hi again,
>
>Now in view fields i can view the totdiscount, but i don't understand your cause select
>
>select myfield1 as item, what's myfield1 here?
>
>I have this code, can you integrate here the SQL cause,
>
>* Apresenta dados Documento na View
>requery ("int_doc_vnd")
>select int_doc_vnd
>* Soma Valores Documento
>sum n_quant*n_prunit to lnTotDoc
>select.......
>
>Thank's, but i'm really a beginner for now....
>
>Joao Batista