>Hilmar thanks for your answer
>
>I don't need to sometimes show records, and sometimes not. Let me explain it to you in other way
>
>The user is creating an order and his respective line items in one form specially designed for this purpose into my application, at this time he needs to delete one or more line items for any reason. when he needs to print the order it prints the line items deleted too. I only need to print only the not deleted line items.
>
>The report to print the order has a view which join all tables needed for this function (orders, order_items, customer, etc). The situation is if I put the condition Deleted() in the fiter property of the view into the report data enviroment, the system filters all order and doesn't print nothing. For these reason i think what the solution is to make the filter in the database when i am creating the view in the view designer, however I don't know how can I do that.
I think you must use SET DELETED ON. Note that this is "scoped to the current datasession"; this means that SET DELETED can be ON in one form, and OFF in another (if you use private datasessions, as you should). Specifically, the default is OFF. You might have a form that asks the user for printing options; I would SET DELETED ON in the Form.Load() event.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)