cancel
Showing results for 
Search instead for 
Did you mean: 

BOLD format for Partial table record in Adobe form?

naveen_inuganti2
Active Contributor
0 Kudos

I am having table data in my Adobe form output:

1. First record for INDIA

2. Second record for USA

3. Third record for UK

Above is table on Adobe layout with two fields and 3 records. First field is for number and second field is for text. This text is coming dynamically from table.

Now, my requirement is display above in below format -

1. First record for INDIA

2. Second record for USA

3. Third record for UK

Regards,

Naveen.I

Accepted Solutions (0)

Answers (1)

Answers (1)

konchada_saikrishna
Active Participant
0 Kudos

Hi Naveen,

Do you mean you need data to be represented as below...?

101 India

102 USA

103 China

If so what is the logic to identify the record to be displayed in bold font ...?

By then I will give you the syntax code to implement it.

Cheers,

Sai

konchada_saikrishna
Active Participant
0 Kudos

Hi Naveen,

Find the below url for similar requirement with code and example form, certainly this should help.

http://blog.pandyaparth.com/?p=65

Cheers,

Sai

Former Member
0 Kudos

Hello Sai,

I don't think it is a good idea to make complex coding like that.

Scripts are not show room for developers. In most cases, complex scripts and logic should and could be avoided.

Scripts should be the last chance if every effort in ABAP failed and should be kept as easy as possible.

Anyway, I'm not sure what Naveen want to have. Please provide more details.

Cheers.

Tao

naveen_inuganti2
Active Contributor
0 Kudos

Hi,

I have a table in my adobe form. Let's say 3 columns and 4 rows.. Data looks something like below..

r1c1      r1c2      This is row1 and column3

r2c1      r2c2      This is row2 and column3

r3c1      r3c2      This is row3 and column3

r4c1      r4c2      This is row4 and column3

You can see that row3 is in BOLD format, this is not complete content of my table cell (r3,c3). Like this I have requirement where I need to highlight the company code in given text. And that text is part of content of my table cell.

I think I can manage to highlight the entire row of a table. But how can we do it for single cell, infact a word in a single cell?

Thanks,

Naveen Inuganti

konchada_saikrishna
Active Participant
0 Kudos

Hi Tao,

I do accept that client side scripting should be last option.

But a requirement of making one word dynamically I believe should be done client side. There is one way of acheiving it from serverside but quite a struggle.

The URL I gave is a hint of approach to acheive the requirement.

Cheers,

Sai

konchada_saikrishna
Active Participant
0 Kudos

Hi Naveen,

As per the example you posted above at all times you wanted column 3 value to be bold but for dynamic rows.

Then just put the below code in form ready event of that particular field, it gets calculated for evry row instance.

if(<your condition>){

this.font.weight = "bold";

}

This should do.

Cheers,

Sai

naveen_inuganti2
Active Contributor
0 Kudos

Sai,

Small correction to your understanding... "all times you wanted column 3 value to be bold but for dynamic rows..."

"...wanted one of the word in column 3 value(not complete cell text) to be bold but for dynamic rows..."

Regards,

Naveen.I

konchada_saikrishna
Active Participant
0 Kudos

Hi Naveen,

If in the 3rd column if you need only one word bold I have a perfect solution.

if its dynamically n word in a column then my earlier post of rich text is the solution.

Cheers,

Sai

naveen_inuganti2
Active Contributor
0 Kudos

It can be third column or any other column. But yes, I know the word which needs to be bolded. So, I will have to look at all the rows in column 3 and check if my word exists then bold it.

Thanks,

Naveen Inuganti

konchada_saikrishna
Active Participant
0 Kudos

Ok, let me put my suggestion with an example

Lets say you have a table with 3 columns

"With the assumption that only one word in any column sud be bold"

Say column C1, C2, C3.

you need to have internal table with 9 fields say F1 to F9 for these 3 columns, 3 for each.

lets say you need to display text "Hello World Example" in column C2.

At the server Side as you know what data to be maipulated, split the above text into 3 fields of the internal table F4, F5, F6, basically the bold field sud be in middle field and the predecessor & sucessor their place.

On the Form at design time, for the table instead of having 3 text fields have a text/caption element for each of them. now in each one of them insert 3 floating fields. make the middle field bold.

this should do, again this is a fussy approach if you cant do that "so called complex script" you dont need to do script here but design is bit tiresome.

Hope you get my approach, else let me know.

Cheers,

Sai

Former Member
0 Kudos

Hi Naveen, try to find and formulate a qualified example. According to your description so far, you will miss a lot of possible solutions.

Generally, Use "this.font.weight = "bold";" is the right solution. The qustion is where to apply this statement. You could apply it to the whole column, or a variable in a column, but not some free text in the column.

You should formulate a qualified example and other people could check if it is possible to make the text as a variable.

Otherwise, you should use scripts to parse the whole text and analyse every word to find your desired words. It is although technically possible, but should be avoided. In this case I would suggest you to check if you could modify the source where you got the text to set the bold text as a variable.

Cheers,

Tao Lin

Former Member
0 Kudos

HI sai,

    My reqirement is Highlit the partiuclar row in table.

   so, i used ur logic in body row.

   but,it is not working...No cahnge in output.

  PLs giv reply as early as possible.

Regards,

karthik.

nsikka
Active Participant
0 Kudos

You can use a floating field which you want to make bold and put the script on that floating field only

Thanks

Nitin

Former Member
0 Kudos

HI Nitin,

I  used following logics to highlight the particular row.

if (this.rawValue == '**End of Income**' ){

data.I_TABLE.BodyRow.TEXTS.border.fill.color.value = "200,254,254";

data.I_TABLE.BodyRow.BUKRS.border.fill.color.value = "200,254,254";

data.I_TABLE.BodyRow.RP.border.fill.color.value = "200,254,254";

}

   

or

if (this.rawValue == '**End of Income**' ){

data.I_TABLE.BodyRow.border.fill.color.value = "200,254,254";

}

But,its not working...

So.pls in detail explain what to do?

Thanks in adv,

karthik.

nsikka
Active Participant
0 Kudos

Hi,

what I could think of is.. that ABAP is having some good string functions.. so while passing that table from print program, check and pass a flag along with each entry (Row). If flag is there then you can highlight the border on the form using script.

Thanks.

Nitin

Former Member
0 Kudos

Hi Sai,

I wanted to make entire row content bold based on condition.

Node Structure:

BarcodeLines has no country and id fields.

Example:

No  Country Id

***********************

101  India   1

102  USA      2

103  China   1

Here if id == 1

then entire row content must be in bold.

Thanks in advance for your help.

Best Regards,

Channa.


konchada_saikrishna
Active Participant
0 Kudos

Hi Channa,

I wish you could have created a new thread, this being quite old doesn't come into focus.

anyways follow the below script as an example.

You sud write the code on the doc ready event of the column "id". 

form1.Body.Table1.Row1.cell2::docReady - (JavaScript, client)

if(this.rawValue == 1){

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

}

Note: here "parent" is the top subform which is encapsulating the field value "id", for each parent in the script it is going one step up.

Cheers.

konchada_saikrishna
Active Participant
0 Kudos

hey Nitin,

Sorry somebody posted a query and I came to see your post after 1 year.

As per your logic its just an another field from driver program to define which element to be in bold, but you still need to write script in form to conditionally make it bold.

For dynamic content represented on form driver program can only feed data it cannot drive element attributes other than visibility.

Cheers,

Sai

Former Member
0 Kudos

Hi Sai,

Thank you.

can't we set font for entire row content at a time instead of updating for each column.

Thank you for your support.

Best Regards,

Channa.

konchada_saikrishna
Active Participant
0 Kudos

Hi Channa,

The code I gave is to set entire row as bold based on field value.

We need to write the code on the specific field which bears the conditional value.

now when you say "this.parent" this refers to the field and then the "parent" refers to the row.

Since we set it to bold on parent, all fields with in that are set to bold as per inheritance.

Note: in Adobe every encapsulation component is indeed a subform.

Cheers,

Sai