cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic change of font in table

Former Member
0 Kudos

Hi All,

i am having 4 coloums in a table in adobe form i am printing 3 coloums

4 coloum specifies wheter 1st coloum is bold or not.

so i need to write a script in adobe form to check the vaue of the 4th coloum

if the value is 'B' then while displaying the current row 1st coloumn should be bold.

if the value is 'N' then while displaying the current row 1st coloumn should not be bold.

Thanks and Regards

JK

Accepted Solutions (0)

Answers (4)

Answers (4)

OttoGold
Active Contributor
0 Kudos

Looks like we all agree it is a structure mistake. Imho you should adapt your structure as I described first and then try to debug some other mistakes. If the structure is not correct then there is no other way than to repair it. Imho nobody will provide any "better" advise. Otto

Former Member
0 Kudos

Hi all,

Thanks for the replies.

just by writing java script i was able to achive it.

just by writing this code in the initilze event of the text field.

since the text filed is a floating value in static text we need to make both text and static text as bold then it is possible.

if ( this.parent.parent.<col4>.rawValue == "B" )

{

this.parent.parent.X25_TEXT37.font.weight = "bold";

this.font.weight = "bold";

}

else

{

this.parent.parent.X25_TEXT37.font.weight = "normal";

this.font.weight = "normal";

}

Thanks and Regards

JK

OttoGold
Active Contributor
0 Kudos

Dou you have your subforms structure like this:

table subform (object - subform - content - flowed)

row subform (object - binding - repeat subform checked - min count checked)

field, field, field

If you are experienced with forms, sorry for the basics. You didn´t provide many details.

OttoGold
Active Contributor
0 Kudos

Hello, I use following code to let my users to format the output in the tables.

I have given them some constants (like "01" in the follwoing code), these codes work like MS Word styles.

Example code: (format is a hidden field with style, this is a table row, subform which wraps in the fields)

if (this.format.rawValue == "01"){

this.schvaleny.rawValue = "";

this.upravovany.rawValue = "";

this.nazev.font.size = "10pt";

}

Hope this helps. Otto

Former Member
0 Kudos

Hi,

Follow the thread [Read Table Java script|] for looping the Table.

Then as specified in the thread in the "for" loop of Table write an "if" condition for the 4th column to check whether it is "B" or "N"

if it is "B" then inside if write the below statement


if ( xfa.resolveNode("data.tablesubform.table1.row["+i+"].column4").rawValue == "B" )
{
      xfa.resolveNode("data.tablesubform.table1.row["+i+"].Name1").font.weight = "bold";
}
else
{
    xfa.resolveNode("data.tablesubform.table1.row["+i+"].Name1").font.weight = "normal";
}

Regards

Pradeep Goli

Former Member
0 Kudos

Hi Pradeep,

Thanks for the response.

in the java editor i am not at all getting the row option

like you have mentioned.

body.tablesubform.table1.row

after table i am not getting the row option.

and also i gave message box in java script that is also not displaying.

can you please help me in this.

thanks and regards

JK

Former Member
0 Kudos

Hi,

Follow the Blog [Avoiding Common Mistakes When Using Tables on SAP Interactive Forms|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417600%29ID1264839750DB10792355514411700960End?blog=/pub/wlg/4397] to get Table Displayed. If you are not using WebDynpro ABAP then follow similar steps while applying the Binding to table. Or search in this Forum you'll find many Threads related to Table displaying in Adobe Form.

Regards

Pradeep Goli

Former Member
0 Kudos

HI,

i have not created new adobe form it was migrated from smartfoms to adobe forms.

binding is all correct as i could see the data in adobe form.

but in the editor i am not getting the row option.