Help with Boolean field on a report.

I’m trying to show a temp boolean field on a report and their all showing No even though I know 1/4 of them should be Yes when I look them up in the table.

The report is based off the Sales Line table 37. On the aftergetrecord this is my code.

The Name and Prepayment show up fine so I know the GET is working fine.

Here is my code:

gsParentItemNo := ‘’;
gsPrepayment:=0;
gsName:=’’;

gsParentItemNo := “Document No.”;

IF recsaleheader.GET(recsaleheader.“Document Type”::Order,gsParentItemNo) THEN BEGIN

gsDropShipment:= recsaleheader.“Drop Shipment” ; // this is the boolean field giving me trouble.
gsPrepayment:= recsaleheader.“Prepayment %”;
gsName:= recsaleheader.“Bill-to Name”;
END;

The gsDropShipment is a Boolean field same as in the table Drop Shipment in table 36 (mod.).

On the report under Sales Line Body - I have gsDropShipment and their all showing No. gsName and gsPrepayment work perfectly.

Thanks in advance,

Greg

Hi Greg,

Is it a flowfield ? - If so you need to do a CALCFIELDS first.

It’s a boolean field Dave.

Greg

Hi Greg,

Boolean fields can be flowfields e.g. with Lookup in the Calcformula

Look at the field property FieldClass.

If it’s not a flowfield then I’m puzzled

Hi.

I have to agree with Dave - my intial thoughts were the field is a flowfield that is not having it’s value calculated using the correct CALCFIELDS command.

Is this the case? Maybe if it isn’t, you could explain a bit more about this field and why it is added to the sales header table (what is the purpose of the mod)?

You guys were right. After looking at the properties of the field it was a calcfield.

I never realized a Boolean field could be a calcfield.

I fixed the code by adding CALCFIELDS(“Drop Shipment”);

My mistake.

Thanks for all the replies.

Greg

Hi Greg,

The common preception is that flowfields are for calculations only but they can be very handy for lookups as well e.g. Last Payment Date - get the Max date from customer ledger entry table, type payment and this gives you the bonus of an automatic drilldown option as well.

Anyway gald to help [:D]