skbn136
9th March 2007, 01:58
Hello All,
I have a report where I want to make a field bold if it meets certrain criteria. For example "If Item Group = 23" then make Quantity in Bold else leave it normal. I understand that there is a statement that I can add in Report Layout. Any idea how I should go about this. Any assistance shall be highly appreciated
Regards
SKBN
bigjack
9th March 2007, 05:59
i'm not sure if this is possible directly...I usually create two layouts,one for normal display and other for bold display and code the required condition in their layout expression.
Else you can also put a asterisk(*) before the field. Create a report field to print this * and code your condition in print expression.
Let me know if this helps you !!!
JaapJD
9th March 2007, 12:31
In the print expression you can use:
citg = "23" ? cf$(1) & str$(quan) & cf$(0) : str$(quan)
Note that you have to make this a string field and you have to do the formatting of the quantity yourself. If the print expression does not fit, you can use a #define in your report script and use that define in the print expression.
Another option is to add to extra fields of one character. One just before the quantity field and one just behind. The field before the quantity gets print expression cf$(1) with in the print condition: citg = "23". The field behind the quantity should contain cf$(0) in the print expression. Print condition is not really needed there.
bigjack
9th March 2007, 12:39
Hey that was a cool solution :)
skbn136
10th March 2007, 22:29
Hi All
citg = "23" ? cf$(1) & str$(quan) & cf$(0) : str$(quan).
Can anyone please explain as to what this condition is doing. Bigjack, could you please advise how to create a separate layout for this.
Regards
SKBN
mark_h
11th March 2007, 01:12
This is basically an if-then-else statement where the question mark is the then. So citg = "23" ? cf$(1) & str$(quan) & cf$(0) : str$(quan) reads like this:
if citg="23" then
cf$(1) & str$(quan) & cf$(0)
else
str$(quan)
endif
If citg equals 23 then print the quanity bold else just print the quantity. And for this you do not need a separate layout. This goes in the print expression and you just need to make it a domain large enough to print it.
skbn136
11th March 2007, 07:12
Hi Mark,
Thanks for the explanation.
I am a technical person and no nothing about Programming. Which language the Baan Programs use or Baan has its own programming language.
Thanks Again.
Regards
SKBn