How to circle a textbox or box in crystal report based on formula field value? - crystal-reports

HI ,
I am having Y [yes] and N [No] in PDF and i need to circle anyone based on the boolean value in Crystal report.Any suggestions pls......

I don't know about a circle, but you can selectively put a square border around any field by going into the Format Editor, then under the Border tab. Then, under Color put in a formula like:
if {YourField} = "Y" then crBlack else crNoColor
My personal opinion is that if you just want to draw more attention to these fields, a conditional formatting of font color/style might be a more visually appealing way to go.

Related

How to put color for the whole cell

I am trying to color code my list in tableau with red color for dates in end date lesser than today() or when concern column is Yes. I created a dual axis of 1 and 0 to get the cells with color in one column and get the text in another and created a dual axis so that they overlap. For that I created a calculated column where I gave the color red if the conditions meet.
This is in my calculated field:
Color:
IF TODAY()>[End Date] OR [Concern (Yes/No)]="Yes" then "RED"
ELSE "None"
END
However even after totally maximizing the size of the square for color for 1. The fields do not fill the whole cell. How do I fill the whole cell?
Here is the pic:
Please help me out here?
You may have 2 options here. I haven't tested so will leave you to see what works best.
Option 1 - use a measure and a Square mark type. Create a calculated field that returns a measure. We can adapt the formula you have built:
INT(TODAY()>[End Date] OR [Concern (Yes/No)]="Yes")
Put that field on Columns - aggregate to either MIN or MAX, doesn't matter - and set the Mark Type as Square. Also put this field on Colour and set your colours accordingly. Put your text on the Label shelf (or Text, I forget what it's called with the Square mark type.
Option 2 - similar to what you have now. You don't need MIN(1) and MIN(0), just one of those should suffice. Make it Gantt, the above calculated field on colours and your text field on Label. This article on the Tableau placeholder technique describes how to do this.

How to Create Dynamic Line in Crystal Report

I want to draw a line in crystal report which can be suppress in special situations.
For example:
Value1|Value2|Value3
If Value3 is null then result is:
Value1|Value2
Any suggestion?
i think that the best way to create dynamic line as you said ,is using borders. you can use Text objects borders to create your line and you can create a formula to change the border color to white in your special situations.this is a sample which you can use in your border color formula:
if {?PERCENT_RATE_IN}= -1 then
crBlack
else
crWhite ;

How to apply color dynamically in a header text box on Tablix SSRS

I did a ssrs report using Tablix Matrix control. I am designing that matrix with one column and many rows. That once column will repeat based on the group that i had from SP at run time. It works fine. But now I want to change the background color dynamically for the header text box of the tablix. Is it possible?
I need to do dynamically. Since I dont know how many column will get at run time. It depends upon the data from Stored Procedure.
Can any one help me out this?
You can set the background color for the textbox to an expression, just like any other text box. For example, something like this:
=Iif(Fields!MyHeader.Value = "AlertColumn", "#FF0000", "#FFFFFF")
This is a bit old post. But I can say that yes we can achive alternate row/Column background color on Matrix control.
Please take a look into Matrix row/column background color thred.

if entry from database is of a certain value, substitute an image on the report

I am trying to read a value from my database, and depending on the character, have a different image show. Basically the values will either be b,r,g,or y for blue, red, green yellow and in the report I would like to show a colored circle corresponding to the entry. Does anyone know a quick way to do this? I am new to crystal reports. Thank you.
Circles are created using a rectangle (yes, really). Set the roundness=100%. Unfortunately, you can't hide/show (suppress, In Crystal's vernacular) a rectangle with conditional logic. Nor can you change its x and y values. So, for your purposes, its useless.
One option is to insert four, colored, images of circles. Suppress all but the one that you want to display.
Another option is to insert a text box, then add a circular, wingding character to it (Word can help w/ this). Use the text box's conditional formatting to change its color.
One additional suggestion to craig. You could:
create an image file for each of the coloured circles
add one of these coloured circles to the report
right click, format graphic
from the picture tab, select the formula editor for graphic location
enter a formula which looks for the relevant coloured circle image file
'C:\circles\' + {table.field} + '.jpg'
L

Different color of rectangles (even/odd row)

I know how to color the full section (Section Expert - Color - Use Modulo Formula) but I also want to color rectangles in a row different. Well I think best way to explain this is an image:
http://i40.tinypic.com/2jd4wl.png
I made the layout using rectangles (hope they're called so in the english version)
is there any way to solve this? Maybe a possibility to set the background color of a ractangle by a formula?
I don't believe that drawing objects, including the box and line, support conditional colors in CR2008. Unfortunately, they also don't support conditional suppression so you can't just stack the objects and selectively suppress them to get the colors you want, either.
Other fields DO support conditional backgrounds, though. So you should be able to do away with the boxes altogether and just use the display fields (whether DB fields, formulas, whatever) to color the report. If you JUST want the colored boxes with no data in it, you can be sneaky and insert a blank text field and conditionally color the background (Right click on field -> "Format Text" -> "Border" tab -> "Background" -> Enter a conditional formula that returns a color). Bam, you've now got yourself a conditionally-colored box/rectangle.