Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic Color of Detail Post Reply Post New Topic
Author Message
d2davids
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: Canada
Online Status: Offline
Posts: 4
Quote d2davids Replybullet Topic: Dynamic Color of Detail
     Posted: 15 Oct 2012 at 6:15am
Using CR XI.

I am attempting to create report layout with a dynamically colored row background for each detail row. I alternate the color for odd and even rows to give a banded look for easier separation rows when reading the details.

The colors of the bands are being supplied by the store procedure used to create the record set CR is using for the data. This needs to be done because a vendor may have different color schemes based on each individual client requirements.

The problem here is:

Boxes do not allow for dynamic color but can extend to the bottom of section when details span more than one width of a particular column.
Text object do allow for dynamic color but cannot extend to the bottom of the section when details span more than one width of a particular column.

Eg. Row has 3 columns of data and 1 coloring text object at the back of order (simulating background).
Each column of data has "Can Grow" of 0 because some details can be several sentences long.


How do I get the "background" text object to be the same height as the expanded detail object that spans multiple lines. Thus, maintaining my banded row design approach?

Is there height value?
Can fix the characters each column will have, thus, allowing me to use len(detail column) / char_max_per_line computation? This one would likely only work for a font like Courier, as all the characters regardless case, have the same width.

Is there another approach to achieve my banded row design?


Doug
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Oct 2012 at 1:55pm
silly question, as I know that I have written banded reports but it's been a while...can't you just set the color of the section and the objects to transparent (if they aren't already) and not worry about the rest.
 
As for height, yes you can change the height, the hard part is knowing how tall to make it, as CR does not provide any access to the size of an object after it has been printed.
 
Sorry couldn't be more help.
IP IP Logged
d2davids
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: Canada
Online Status: Offline
Posts: 4
Quote d2davids Replybullet Posted: 16 Oct 2012 at 3:24am
That alternative will require me to remove the side boards I am currently using to encapsulate the details from the margin.
I have tested and the design and it is acceptable but not preferred.
 
Thank You for your suggestion.
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Oct 2012 at 4:41am
Sorry, I guess I missed the sideboard as part of the layout...which would negate  my suggestion.
 
is it possible to set the color of the sideboard...perhaps setting that object's color is simpler than all the objects on the row, so that you could set the color of the row and the sideboard...unless it is like the detail and is a collection of objects....
 
 
IP IP Logged
d2davids
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: Canada
Online Status: Offline
Posts: 4
Quote d2davids Replybullet Posted: 16 Oct 2012 at 8:01am
No, you did not "miss" it, I did not correctly explicitly mention it. It was implied by my reference to boxes but my fault for not stating the boarder requirements as well.
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum