Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REPLACING ZERO VALUES TO NULLS FOR DISPLAY

Status
Not open for further replies.

copelanda

Programmer
Sep 11, 2006
1
US
I have a data window that I want to display the quantity of the order if the order qty is greater than 0. I dont want the 0 to display. I added a check in the visible property on the general tab of the field which stated order_qty > 0 make visible. The problem is that when ra ow is 0 then all will not show visible. Second I tried placing a case statement directly in the sql select of the datawindow ie.
when "ORD_QTY" = 0 then '' end as AC_ORD_QTY - that seemed to do the same- make all values null. Any suggestions? This is strickly done through a datawindow report not using a window. I want to display '' for 0 values and the actual value for values > 0. Thanks in advance
 
You should simply be able to use the control's Visible property with something like: IF( ord_qty > 0, 1, 0 )

Otherwise, you can use a computed field with something like: IF( ord_qty > 0, String( ord_qty, '#,##0.00' ), '' )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top