Display field based on Status on Report

liizzliizz Posts: 135Member
Hi all,

I have a report based on Sales Shipment Header and Sales Shipment Line.

I have defined a boolean field in the Sales Shipment Header namely Status.

IF Status = TRUE THEN
display the variable field (the description from item table)
else do not display it

Please help me.

Thanks
Liizz

Comments

  • mohana_cse06mohana_cse06 Posts: 4,890Member
    you mean the caption also or only the data?
  • imclever1205imclever1205 Posts: 120Member
    Hello,

    First you have to get the Item Description from the Item Table.
    Then assign it to an array.
    Then using your condition,it should look like that :


    If status= TRUE then
    array[1]:=item.description
    else
    array[1] :=item.description;
  • gerrykistlergerrykistler Posts: 149Member
    Make a variable ItemDesc, put this in the section of your report and then use this code:
    If Status then
      ItemDesc := Item.Description
    else
      ItemDesc := '';
    
    Gerry Kistler
    KCP Consultores
  • navuser1navuser1 Posts: 1,126Member
    IF Status THEN
    yourVariable := Record.Field
    ELSE
    yourVariable :='';

    Or

    If you are using a print section for Report then use the following code sample in OnPreSection() trigger:

    CurrReport.SHOWOUTPUT(Status)
    Now or Never
  • faizguy84faizguy84 Posts: 52Member
    Hello,

    First you have to get the Item Description from the Item Table.
    Then assign it to an array.
    Then using your condition,it should look like that :


    If status= TRUE then
    array[1]:=item.description
    else
    array[1] :=item.description;


    No need to create array, simple variable will do as explained by gerrykistler.
    _______________
    Regards,
    Faisal Bukhari.
Sign In or Register to comment.