Barcode 39 Query

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hi I am using crystal 2008 and have a template with a sub report to show operations.
I want to add a barcode if one operation = canning.
I have been advised to add the query to the field format x2 which I have done but it doesn't seem to be working. Below is the query I have added
if {Documents/Document/DetailData/DetailLine/Operation.DetOpsWorkCentre} = "Canning" then
BarcodeC39ASCII({Documents/Document/DetailData/DetailLine/Operation.DetOpsNarrat})
else
{Documents/Document/DetailData/DetailLine/Operation.DetOpsNarrat}

Has anyone got any ideas
Thanks
Juliette