Home » Developer & Programmer » Reports & Discoverer » How to set part of string in bold? (Report Builder 11g)
How to set part of string in bold? [message #583425] Tue, 30 April 2013 12:53 Go to next message
neimad
Messages: 13
Registered: April 2013
Location: Canada
Junior Member
Hi,
I'm new here, so, hi every body. I work with Oracle Forms and Report Builder since several weeks, but now i have something that i want to do with Report Builder.

I get string from DB (It's a paragraph)
But i would like to set bold weight on a part of the string

for now, i set bold text i want to and
i have created a fonction that make text bold like this

l_chaine := (SUBSTR(MyStrFromDB, InSTR(UPPER(MyStrFromDB), '[B]'),InSTR(UPPER(MyStrFromDB), '[/B]') ));

if(length(l_chaine) > 0) then
      SRW.SET_FONT_WEIGHT(SRW.BOLD_WEIGHT);
end if;


but it doesnt look to works..

how can i do that? And where i can do that?

Is it possible to do that?

thanks for your help.
Re: How to set part of string in bold? [message #583431 is a reply to message #583425] Tue, 30 April 2013 14:05 Go to previous messageGo to next message
Littlefoot
Messages: 19889
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option is to split that paragraph into 3 parts:
- the first part is text in front of the bold text (let's call it THE_FIRST_PART)
- the second part is the bold text itself (THE_BOLD_PART)
- the third part is the rest of the text (THE_REST)

Then, in Paper Layout Editor, you wouldn't create fields for these parts, but use the "&" notation, such as:
This is Paper Layout Editor. The first part of the text is &THE_FIRST_PART, bold will be &THE_BOLD_PART, and here goes &THE_REST of the text
. Now it is easy to mark (select, with a mouse) &THE_BOLD_PART and make it bold (using the toolbar).
Re: How to set part of string in bold? [message #583478 is a reply to message #583431] Wed, 01 May 2013 08:30 Go to previous message
neimad
Messages: 13
Registered: April 2013
Location: Canada
Junior Member
Hi, thanks for your reply, but the problem is the bold marks can be everywhere in a paragraph.

The solution i've found are to set the Area to support HTML Tags, and i replace the [ B ] and [ /B ] with < p > and < /p > and that looks to works.

but if you have another tips.. i'm open!

thanks again.
Previous Topic: Reports based on data
Next Topic: Oracle Reports Print Object On
Goto Forum:
  


Current Time: Fri Dec 19 18:22:33 CST 2014

Total time taken to generate the page: 0.09070 seconds