cancel
Showing results for 
Search instead for 
Did you mean: 

how to make the specific rows as bold in table

Former Member
0 Kudos

Hi,

I have designed a layout which contains a table. I need to make some specific rows as BOLD on the table based on some condition like where DATE = space. , these rows are displaying through an internal table. I have placed this table in a sub form.I don't know how to achieve this in adobe forms.

Header 1Header 2Header 3
DATEDocument numberCredit amont

Please find the attachment for sample output and the layout.

Quick response would be appreciated.

Thanks for your help in advance,

Suman

Accepted Solutions (1)

Accepted Solutions (1)

pavan_prabhu
Active Participant
0 Kudos

Hello Suman,

     Don't write the code on individual fields. Write the Javascript code only once directly on the DATA sub form in the Initialize event.

Suppose the field names are DATE, DOCUMENT and CREDIT.

if ( ! this.DATE.rawValue.isNull )

{

  this.DOCUMENT.font.weight = "bold";

  this.CREDIT.font.weight = "bold";

}


You can refer the below link wherein I have tried and tested. It works fine.

http://scn.sap.com/thread/3520000

Former Member
0 Kudos

Hi Pavan,

Thanks for the reply, as per your code it is working when date NE space. but my expected output is as below.

Date (Дата)Document (Документ)Debet (Дебет)
Opening Balance500.00
03.11.14500000000586,158.70
03.11.14500000001546,156.59
03.11.14500000100546,156.59
03.11.14500000101546,156.59
03.11.14500000102546,156.59
Turnover for the period2,770,785.06
Closing Balance1,132,315.29
pavan_prabhu
Active Participant
0 Kudos

Hello Suman,

     Well, In that case isNull or == " " won't work.

You have to work conversely(reverse) over here.

What you should do is, set the Font property of all the individual fields in the table as default "Bold" in the Layout as shown below.

Now Write the Javascript code only once directly on the DATA sub form in the Initialize event as shown below.

if ( ! this.DATE.rawValue.isNull )

{

  this.DOCUMENT.font.weight = "normal";

  this.CREDIT.font.weight = "normal";

}

I have tested it in a test form and it works fine.

Former Member
0 Kudos

Thanks a lot  Pavan, It's working now.

Have a great day!!

Answers (1)

Answers (1)

navip
Active Participant
0 Kudos

You can achieve this requirement through javascript.

Eg:

if ( ! this.CDATE.rawValue.isNull )

  { this.CDOCU.font.weight = "bold";

  this.CDEBIE.font.weight = "bold"; }

Please follow the above script to all the fields which you want to display in bold.

---

Naveen



Former Member
0 Kudos

Hi Naveen,

Thanks for your response. I have tried with the below code as suggested but i cann't see any change in the output.

----- data.Page1.TABLESF1.Free_space.IT_TABLE.DATA.CDATE::ready:form - (JavaScript, client) --------

if ( ! this.CDATE.rawValue.isNull )

  { this.C_DOC.font.weight = "bold";

    this.C_CREDIT.font.weight = "bold";

    this.C_DEBIT.font.weight = "bold"; }

Please advise.

Thanks

navip
Active Participant
0 Kudos

Please follow the below link :

http://scn.sap.com/thread/3520000

---

Naveen

Former Member
0 Kudos

Hi Naveen,

I have maintained the code as advised but it is working in opposite direction.

I want to make the row bold when DATE field space. But now it's making BOLD when DATE field is not initial. I want make other columns as Bold when DATE =  ' '. I believe this make sense. I have tried by removing ! from the below code but not working. Please help.

if (  this.DATE.rawValue.isNull )

{

  this.DOCUMENT.font.weight = "bold";

  this.CREDIT.font.weight = "bold";

}