Display field based on Status on Report

liizzliizz Member Posts: 125
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 Member Posts: 5,503
    you mean the caption also or only the data?
  • imclever1205imclever1205 Member Posts: 94
    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 Member Posts: 149
    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 Member Posts: 1,329
    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 Member Posts: 52
    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.