I have a shape and I want it to change color corresponding to a data field. For instance I have a query with 5 category's (cat=1, cat=2 etc) and for each category I want that shape to have a different color.
I tried writing in the "conditional shape expression" many variations of this:
=IF([Cat]=1;Shape.FillColor=RGB(100.200.300))
I am a new user of openoffice and I don't have a grasp of the syntax needed. I know how to Conditional format a text but can't use Format>Conditional Formatting on a shape.
Conditional shape coloring in report
Conditional shape coloring in report
OpenOffice 4.01 on Windows 7
Re: conditional shape coloring in report
Nice try!
Unfortunately Writer's fields are fairly primitive; you can't use shapes in a formula (see the online help under Index > "formulas;calculating in text" > "Formula bar" for more info.
Here's one way to do it: create the shapes with the colors you want, each shape anchored "as character" and in its own paragraph, then add a "hidden paragraph" field to each paragraph with the condition needed to hide the paragraph unless the condition is met.
Here's a sample arranged this way:
Unfortunately Writer's fields are fairly primitive; you can't use shapes in a formula (see the online help under Index > "formulas;calculating in text" > "Formula bar" for more info.
Here's one way to do it: create the shapes with the colors you want, each shape anchored "as character" and in its own paragraph, then add a "hidden paragraph" field to each paragraph with the condition needed to hide the paragraph unless the condition is met.
Here's a sample arranged this way:
- Attachments
-
- alternate_shapes_sample.odt
- (9.59 KiB) Downloaded 330 times
AOO4/LO5 • Linux • Fedora 23
Re: conditional shape coloring in report
Thanks for the prompt reply.
I am using the sun report builder in OpenOffice base, and can't really see how to make your example happen there. Maybe it would work in the old wizard report builder. But I really need a solution in the sun report builder if there is any.
I am using the sun report builder in OpenOffice base, and can't really see how to make your example happen there. Maybe it would work in the old wizard report builder. But I really need a solution in the sun report builder if there is any.
OpenOffice 4.01 on Windows 7
Re: Conditional shape coloring in report
I thought the report builder just constructed a Writer document--can't you edit the report in Writer and make whatever changes you need?
I don't know; I've never touched the report builder so I could be completely off track.
I don't know; I've never touched the report builder so I could be completely off track.
AOO4/LO5 • Linux • Fedora 23