Ajesh
24th April 2013, 13:25
Hi
I have a Requirement of setting a Variable as Bold on Report. While i am able to use cf$(1) to set as Bold in the Before.Layout Section of Detail Sub Section but the variable is getting reset to what it was before.
I have used it successfully on an other variable but not for this.
Need help on this
mark_h
24th April 2013, 15:52
Can you post the script or relevant code? If this is something that gets printed on the report - can't you just maintain the field and click bold on the report field itself? Or maybe even use the print expression itself. In the print expression you can do things like total.hours=0 ? 0.0 : past.due/total.hours *100. You could try something like this in the print expression total.hrs<0 ? cf$(1)&str$(total.hrs) : str$(total.hrs). In this format the ? is like the then clause of an if statement and the : is the else component. If you try it then you need to make sure you pick a string domain and print expression long enough to cover whatever is being printed.
Ajesh
25th April 2013, 08:38
I wanted to make the variable sort.wloc bold if the Variable multipack is not empty.
The Code which i am using is
multipack<>"" ? cf$(1)&sort.wloc&cf$(0) : sort.wloc
But the Compiler is giving the Error which says Array Name not Allowed.
mark_h
25th April 2013, 15:51
Are multipack and sort.wloc both declared as input strings to the report? Is multipack or sort.wloc an array of some sort or how are they declared? If they are a string array then you should include something like sort.wloc(1,1) - first array element starting first character.
I just tested and this works on my 4c4 system. You can see from the attached I just took an item field - which is never really blank, and printed it bold. It compiles just fine. I also changed the domain to make sure it was long enough to hold the item and esc sequences for bold. So this does work.
Ajesh
26th April 2013, 10:36
Thanks. It has worked now. For some reason i put the expression in "Condition" Field instead of the "Expression" Field.