cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form - change text color of a tabl;e cell when building a table

Former Member
0 Kudos

Hi Experts or Anyone who had done this before

Please help me to solve this before I am going crazy...

I am using Adobe Form to map the data from an internal table and Use an ABAP pgm to call the generated function to print out the Adobe PDF for. I am NOT using Abode as an interactive form.

This is the layout from the Hierachy

data

| Report

| | Table1

| | | HeaderRow

| | | | HeaderRowField

| | | DataRow

| | | | DataRowField

What I am trying to achieve is that when the dataRowField value = 'X'. I set the color to red - But I cannot

get hold of the field value for comparision.

(sofar I have successfully loaded the data from an internal table into a table on the form layout)

this is what I have tried..

if xfa.resolveNode("data.Report.Table1.DataRow[].DataRowField[]").rawvalue = "X" {

// Set field text to red color (?) --How??

}

I place this javascript in the DataRowField ready:form event - Is this right?

Please help

I will reward points to any reply - Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Liem,

Use the follwing code to change color:

if ( <Fieldname>.rawValue > 100 ) then

<Fieldname>.caption.font.fill.color.value = "200,10,10"

endif

Here <Fieldname> is assumed to be the field for which you want to change the colour. suppose the value for it is greater than 100 it will become red and for values less than 100 it will be the default colour or you set in its properties.

Hope it will be helpful.

Regards,

Arafat