I have a formula that will display data in the Details section into one line like this:
ItemA
ItemB
ItemC
prints out as one line like this:
ItemA, ItemB, ItemC
The solutions requires three formulas:
1) In the Group Header place the @reset formula:
WhilePrintingRecords;
StringVar chain := '';
NumberVar ChCnt := 1
2) On the Details place the @Accum formula:
WhilePrintingRecords;
StringVar Item:= {MYFIELD}
StringVar Chain;
NumberVar ChCnt;
if ChCnt = 1
then (ChCnt:= 2; chain := Item)
else
if Length(Chain) + Length(Item) > 254
then Chain := Chain else
chain := chain + ', ' + Item
3) On the Group Footer place the @Display formula:
WhilePrintingRecords;
StringVar Chain
What I am having issues with is I want to BOLD certain items in {MYFIED} based off the value of another boolean field.
Example - my existing data is ItemA, ItemB, ItemC
Now based off the result of a boolean field in the same data group I want ItemA to be BOLD, ItemB & ItemC to be regular font.
So if {BooleanField}=0 then {MYFIELD} crBOLD else crregular
This is easy to do when displaying a regular field in the Details section but I can't figure out how to do it in the above formula when it displays the data in one continuous line.
Any ideas?
ItemA
ItemB
ItemC
prints out as one line like this:
ItemA, ItemB, ItemC
The solutions requires three formulas:
1) In the Group Header place the @reset formula:
WhilePrintingRecords;
StringVar chain := '';
NumberVar ChCnt := 1
2) On the Details place the @Accum formula:
WhilePrintingRecords;
StringVar Item:= {MYFIELD}
StringVar Chain;
NumberVar ChCnt;
if ChCnt = 1
then (ChCnt:= 2; chain := Item)
else
if Length(Chain) + Length(Item) > 254
then Chain := Chain else
chain := chain + ', ' + Item
3) On the Group Footer place the @Display formula:
WhilePrintingRecords;
StringVar Chain
What I am having issues with is I want to BOLD certain items in {MYFIED} based off the value of another boolean field.
Example - my existing data is ItemA, ItemB, ItemC
Now based off the result of a boolean field in the same data group I want ItemA to be BOLD, ItemB & ItemC to be regular font.
So if {BooleanField}=0 then {MYFIELD} crBOLD else crregular
This is easy to do when displaying a regular field in the Details section but I can't figure out how to do it in the above formula when it displays the data in one continuous line.
Any ideas?