Crystal Report issues

 5 Replies
 0 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Author
Messages
dipu
Basic Member
Posts: 9
Basic Member
    Hi all,
    I have a crystal report with two commands and it returns the correct data. Now I need to add one more filed to the report to show the displayed employee is a manager or not. Employee number is there in Employee table and Supervisor table. If the emoployee number is there in Supervisor.employee filed then it has to display as Yes(Manager) or No for the employee.employee in the report. Could you please help me on this?
    Chris Martin
    Veteran Member
    Posts: 277
    Veteran Member
      A Crystal formula with an if-then-else statement would work. My preference would be a case statement in the SQL command, however.
      dipu
      Basic Member
      Posts: 9
      Basic Member
        I have created a formula like this:
        if ({Command_1.EMPLOYEE} in [{Command_1.SUPERVISOR.EMPLOYEE}]) then {Command.POSITION.SUPERVISOR-LNK}="Y"
        else {Command.POSITION.SUPERVISOR-LNK}="N"

        but  I am getting only "False" even if the employee is a manger. Please help
        John Henley
        Posts: 3353
          You are not using the correct syntax--are you trying to assign to a variable?

          Thanks for using the LawsonGuru.com forums!
          John
          dipu
          Basic Member
          Posts: 9
          Basic Member
            I have changed a formula like this:
            if ({Command_1.EMPLOYEE} in [{Command_1.SUPERVISOR.EMPLOYEE}]) then "Y" else "N", however still I am getting the same eoor. N for all.

            The report output will have a list of employee.employee (Unique Number), and that number may not be there in the listed supervisor.employee (The manger of the listed employee will be different employee). Suppose I have an employee 278 and he is a manager, then his employee number should be there in the supervisor.employee field. If the report shows only two records in that the employee 278 is listed and the supervisor for this employee is 416. The report shows the employee.employee(278) and his supervisor.employee(416). Here I need to know how can I check the listed employee(278) is in the supervisor.employee filed. Please advice.
            JonA
            Veteran Member
            Posts: 1163
            Veteran Member
              How about this...

              IF {Command_1.EMPLOYEE} = {Command_1.SUPERVISOR.EMPLOYEE}
              THEN "Y"
              ELSE "N"

              Jon Athey - Sr. Supply Chain Analyst - Materials Management - MyMichigan Health