Crystal Reports 2008 changing text output color based on datetime value - crystal-reports-2008

I'm new at Crystal Reports, & trying to write a formula in Crystal Reports 2008 that will produce red text if a specific datetime field is null, and black text if it is not null. CR 2008 does not have a formula button next to the font color picker when formatting the existing text field, so I'm trying the following formula to generate the text, but I can't seem get the crRed & crBlack color values to input properly:
WhilePrintingRecords;
Global stringVar sText;
IF IsNULL({CONTACT.CSS_HR_DESK_OFFICE_ASSIGNED})
THEN sText:=("TEXT")
ELSE sText:=("TEST");
Any help would be greatly appreciated!

right click on the field
format field
fonttab
click the formula editor for color
if isnull({field}) then red
else
black
but a null field wont display text to change to red :)

Related

Visual Studio Report building expression issue

I would like to hear some tips on how to solve my problem.
So, i have Visual Studio report with row groups: Year->Month->Day->Details
And my report table with all data, it shows data grouped in rows:
Everything works, but i need to do one thing. In [Hour] row, field/text box [SverT] i have set an working expression for font to change color:
=Switch(Fields!SverT.Value = Avg(Fields!SverT.Value, "Day"), "Black",
Fields!SverT.Value > (Fields!UzdT.Value+5), "Red",
Fields!SverT.Value < (Fields!UzdT.Value-5), "Red")
But i need that upper row [Day] fields [Avg(SverT)] also would change font color if any row in [Hour] have changed color to "Red". How can i do it? What expression to use in that [Avg(SverT)] textbox?
If I have vaguely expressed my problem, if needed, I will try to describe it more clearly.

How can I make Stata display all the value label in the Data Editor?

I am working with a dataset in which I have information on the occupation in which an individual is employed (see image below). In the data editor, I'd like to be able to read the occupation, while now Stata truncates the information displayed.
format occ2010 %20.0g
You can change 20for any width you like.

Oracle Apex 5 how to change cell color in classic report based on cell value

I have a classic report in my APEX app. I need to do something like conditional formatting in Excel - to change background color of cells in one column, based on the value of the cells. I found some tutorials, but all for interactive reports, which didn't work with the classic report. Can anybody help me with that issue?
If you're trying to conditionally color entire rows, you'll probably want the built-in alternative row templates with conditions. It's part of the report template.
But if you want to format individual cells, the usual way of doing it is to calculate the background color you want in a new SQL column, hide the column, then get the color value using a #COLUMN_NAME# substitution variable. See this article for a simple example, but there are a lot of other examples if you just search for apex conditional cell formatting.

MS Visio 2010: Saving as .svg sets values to 0

I want to save my Visio shapes as an .svg file to incorporate into a XML document. However, when i save it ALL the values in my shape are set to 0. I've quadruple checked the shape data and all the values are there and the formulas are returning the correct values. The strange thing is, saving as a .svg works in Visio 2007 and all values are correct, but in Visio 2010 all the values are 0. Why is this? Unfortunately this is my first post, so I can't add screenshots as i don't have 10 rep.
The shape is 4 individual rows grouped together. The data is stored in the "Main" shape, i.e all rows grouped together. The cell in the individual shape then references its value from the main shape.
Example of 1 of the 4 main shape row forumlas:
ShapeData Property - Value = Sheet.1!Prop.Row_2 (references main shape rows, stores value)
Text Field Property - Value = Prop.Row_1 (references its single row, containing value of main shape)
The real kick here is I fixed this problem 4 months ago, but my colleagues had more shapes with the same issue. I cannot remember how i fixed it, and the shape that I fixed is identical in terms of structure and data handling.
Something strange that I also noticed is that when i type ".Value" after the Value field text in either the Text Fields or Shape Data properties, the ".Value" gets automatically omitted after I press enter, but then the field produces the right .svg output. However, this does not work when I make that change in the master shape. So effectively, I'd have to go into every single value field and manually type ".Value" and press enter for it to work. I've also tried turning off all shape protection, no joy.
I'm currently in the process of writing a macro to "refresh" all the value fields by adding ".Value" after them to mimic me manually typing that in.
Any help or feedback would be greatly appreciated!
I believe this is upgrade issue (2007->2010). Have seen this a few times. To fix try:
Open the diagram in Visio 2003 (or 2007), but not in Visio 2010
Save it as .VDX (Visio XML Drawing) file
Close it
Open the VDX file again in the same Visio
Save it back as normal VSD file. This should fix the broken VSD file.
Delete the VDX file, it is not needed
If this doesn't work then try sharing the source file (dropbox or whatever).
The problem was that the rows Text Fields were Data Object types. When I removed the Text shape protection and inserted a Shape Data field, the correct values were shown on the .svg output file.

Sort Hex Color Values

I have a color table related to products. The value of colors which is a hexadecimal is saved in a nvarchar field.
In the products section I have a dropdown List for colors of a specified product.
So I need to sort these colors from lighter to darker...
I'm using MVC 3.0 and writting C# code.
You want to get their intensity, so convert from RGB to HSV. See this post for more details.

Resources