Bolding font using print when expression and inline style - jasper-reports

I currently have a PrintWhenExpression that is trying to use a if/else statement like this:
$F{group_description} == "Total Accounts Opened:" ? $F{group_description}.text.setStyle(boldStyle) : $F{group_description}
The only problem is that it isn't working. I want to bold $F{group_description} when it equals "Total Accounts Opened:" and have it not bold if else.
What is the proper inline style to bold a font?

I usually set a conditional style for things like this. In iReport's Report Inspector, you'll have to create a basic style (but you don't need to apply any elements to it) and then right click on that style and choose "Add conditional style". In that style's condition expression you can put $F{group_description} == "Total Accounts Opened:", and then check the box to make it bold.

Related

Change text in textbox based on value

Is there a way to change the text in a dashboard based on a value?
At its most basic, I want to be able to plug in the word 'increased' or 'decreased' based on a change from year to year for a report.
If you mean the free-floating Text object from the same menu as vertical / horizonal containers, Blanks, etc. then you can only use parameters and a few "special" values like Workbook Name.
However, you can use a worksheet as a textbox instead. Just make sure you clear the default formatting (borders, etc.) and put your calculated field that resolves into "increased" / "decreased" on the Text mark. In the same way you can add up or down arrows using CHR() function and set custom colours (by creating two calculated fields that resolve into "increased" and "" and "decreased" and "")

Crystal Reports 2008 Customize underline

I want to import a text from HTML file in Crystal Reports 2008 for our software.
And I tried to make a formula for underline in Crystal to underline my text with dots no matter if the cell in HTML is empty or not. I mention that I search for 4 or 5 hours but nothing useful. Thanks for advice.
For example, i want to use dots to underline the formula for "{denumire_societate}"
Right click on your field and select Format Field
Border tab
Change Bottom -> Dotted
You can optionally create a formula if you want to present Dotted Underline with specific conditions
I want another answer because i want to underline only some words, and i don't wanna put them in separate text box because it will looks unesthetical.
In the picture, i got a text box with many words, formulas, etc, i want to underline a specific one like: {denumire_societate}, {adresa}, {nr_reg_com}, {cui}, {cont}, and the underline to be form by dots.
Text box

Inline custom styles in Microsoft Word

I am using Word for Mac 2011 and I try to define a custom style which I want to apply on single words or parts of a paragraph among my document. But it seems to me that there is only whole paragraph styles. So if I define my new style, let's say underlined and a yellow background, the whole paragraph is directly set to this style.
Anyone know, how to approach this?
Ok, I just found out:
Select text > Format > Style > New
Then select "Character" instead of "Paragraph" for the option "Style type".
I was looking for the same thing today, but in Word for Windows (Office 365 version)
The solution is the same but the steps towards it are different:
Select the inline text
Open the Styles Pane and press the New Style button (left button on the bottom row)
"Character" is now an option for "Style Type"

How to bold / unbold tablix text with an expression?

I have an expression in a textbox of a tablix control:
="Rectification: " + Fields!MoreInfo.Value
What I would like to do is have the word 'Rectification:' in bold and the rest of the text unbolded. Unfortunately I've no idea how to do this.
I've tried the following (as per a suggestion from Google):
="<b>Rectification:</b> " + Fields!MoreInfo.Value
However this shows the tags in their literal form. It also appears that expressions on the bold context apply to the entire textbox and cannot apply to only some parts of it.
I believe you'll need to use placeholders to accomplish this.
Here's an excellent tutorial.

How to set cell-color according to cell-value on ooo-calc?

I can change the style of a cell using conditional formatting. But there I would be limited to a maximum of 3 cases it can handle.
What I want to do is to get the value of a cell, convert it in a certain way and set the result as the cells background-color.
The simplest example would be cells with values between 0 and 10, resulting in gray-steps between white and black.
Is this possible? Are there ways to set the background-color of a cell automatically?
Thx!
This has been implemented in libreoffice 3.6 (see the release notes)
Format one cell how you want (not one you want to conditionally format).
Press F11 to get the Styles dialogue box
Use the button one from the top right, which is "New Style From Selection"
Type the name you want, e.g. BlackBack
Then do the conditional formatting of the relevant cells, choosing BlackBack
Source: http://www.oooforum.org/forum/viewtopic.phtml?t=61294
Note that you can find "Conditional Formatting" under the Format menu in OOo Calc.
As Joey said: "As far as I can see conditional formatting in OOo cannot do that. Excel has no problems there, though."
It's simply not possible... :-/