Crystal Formula for Purchase Orders

SUGGESTED

I'm trying to create a formula that recognizes the individual jobs within a Purchase Order. For instance, on the header I want it to say "See Below" on the Job Number if there are different job numbers on the PO otherwise I want it to print the job header job #. I tried If (podetail poline is > 1 and podetail job <> poheader job then "See Below" else poheader job but doesn't work...

Parents
  • 0
    SUGGESTED

    FLAKj92,

    What do you mean by "doesn't work."

    This appears to work for me:

    if {podetail.poline} >1 and {podetail.job}<>{poheader.job}
    then "See Below"
    else {poheader.job}

    In my test, I did notice that Crystal makes an assumption on how the tables should be linked. Not only did Crystal link on the ponumber but it also created an inner join on the job field (Database>Database Expert>Links) which based on the formula is not going to be a correct assumption.

     

    Casey Knapp

    Senior Customer Support Analyst, Sage Construction and Real Estate

    Sage North America

Reply
  • 0
    SUGGESTED

    FLAKj92,

    What do you mean by "doesn't work."

    This appears to work for me:

    if {podetail.poline} >1 and {podetail.job}<>{poheader.job}
    then "See Below"
    else {poheader.job}

    In my test, I did notice that Crystal makes an assumption on how the tables should be linked. Not only did Crystal link on the ponumber but it also created an inner join on the job field (Database>Database Expert>Links) which based on the formula is not going to be a correct assumption.

     

    Casey Knapp

    Senior Customer Support Analyst, Sage Construction and Real Estate

    Sage North America

Children
  • 0 in reply to Casey K

    By stating it doesn't work I meant it was putting "See Below" on orders that only had one job number. I changed the link to left outer join and created a group for po detail job. I then did a formula for IF GroupName (podetail.job) = (po header.job) then (poheader.job) else "See Below". I was able to get it to work then for both ways.