I have a formula selection parameter that needs some help please. How to rewrite to make it work?
If {IM_SalesHistoryWrk.UDF_SALESPERSON_NO} <> {AR_InvoiceHistoryHeader.UDF_NEW_SALES_REP} then {AR_InvoiceHistoryHeader.UDF_NEW_SALES_REP} else {IM_SalesHistoryWrk.UDF_SALESPERSON_NO} = {?Salesperson No}
Also, does the rest of the report which has formulas with {IM_SalesHistoryWrk.UDF_SALESPERSON_NO} have to be changed?
(example of formula)
if {@SortReportBy} = "W" then
'formula = "Total For Warehouse: " + {IM_SalesHistoryWrk.WarehouseCode} + " " + {IM_SalesHistoryWrk.WarehouseDesc}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
elseif {@SortReportBy} = "P" then
'formula = "Total For Product Line: " + {IM_SalesHistoryWrk.ProductLine} + " " + {IM_SalesHistoryWrk.ProductLineDesc}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
elseif {@SortReportBy} = "V" then
'formula = "Total For Vendor: " + {@PrimaryVendorNumberAndName}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
elseif {@SortReportBy} = "C" then
'formula = "Total For Customer: " + {@CustomerNumberAndName}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
end if
If {IM_SalesHistoryWrk.UDF_SALESPERSON_NO} <> {AR_InvoiceHistoryHeader.UDF_NEW_SALES_REP} then {AR_InvoiceHistoryHeader.UDF_NEW_SALES_REP} else {IM_SalesHistoryWrk.UDF_SALESPERSON_NO} = {?Salesperson No}
Also, does the rest of the report which has formulas with {IM_SalesHistoryWrk.UDF_SALESPERSON_NO} have to be changed?
(example of formula)
if {@SortReportBy} = "W" then
'formula = "Total For Warehouse: " + {IM_SalesHistoryWrk.WarehouseCode} + " " + {IM_SalesHistoryWrk.WarehouseDesc}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
elseif {@SortReportBy} = "P" then
'formula = "Total For Product Line: " + {IM_SalesHistoryWrk.ProductLine} + " " + {IM_SalesHistoryWrk.ProductLineDesc}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
elseif {@SortReportBy} = "V" then
'formula = "Total For Vendor: " + {@PrimaryVendorNumberAndName}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
elseif {@SortReportBy} = "C" then
'formula = "Total For Customer: " + {@CustomerNumberAndName}
formula = "Total for Salesperson: " + {IM_SalesHistoryWrk.UDF_SALESPERSON_NO}
end if