Hello
I am rather new at Crystal and need to know if my approach to a particular formula is correct. I have created a report that has parameters: Beginning Period, Beginning Year, End Period, End Year, and Salesman ID. The report basically shows sales and profit betweem the periods specified. I want to add annual sales and profit using the invoice date based on the beginning year. I have so far created a formula for annual cost but recieve a Boolean is required here error in the bold portion of my code.
if {?Beginning Period} = [1,2,3] then
{p21_view_invoice_hdr.invoice_date} = DateTime ({?Beginning Year}-1,1,1) to CurrentDate and
(if {p21_view_oe_line.po_cost} > 0 then
{p21_view_oe_line.po_cost} else
if {p21_view_oe_line.commission_cost} > 0 then
{p21_view_oe_line.commission_cost} else
{p21_view_oe_line.sales_cost}) else
{p21_view_invoice_hdr.invoice_date} = DateTime ({?Beginning Year},1,1) to CurrentDate and
(if {p21_view_oe_line.po_cost} > 0 then
{p21_view_oe_line.po_cost} else
if {p21_view_oe_line.commission_cost} > 0 then
{p21_view_oe_line.commission_cost} else
{p21_view_oe_line.sales_cost})
Like I said, I am new at this and learning on the fly with no support, so any input will be greatly appreciated.
Thank You in advance