Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Draw line under every 3rd record in crosstab? 1

Status
Not open for further replies.

CarpalT

MIS
Jan 17, 2003
178
US
Feeling dumb here...

We have a crosstab in CR 9.0 that works nicely. We would like to do something to make it a little easier for the user to read. The predecessor report had a line drawn under every third line of data. That's not mandatory, but you get the idea. We can't figure out how to count the lines and so we can draw a line or set the color. I'd be happy to provide more information if I knew what was useful.
TIA


The world is full of good people.
 
If you have a simple crosstab, you can do this if you are willing to number your row fields. First create a formula like the following {@numberrow}, which uses Xtreme database fields:

whilereadingrecords;
numbervar cnt;
stringvar shipper;
stringvar rowlabel;

if instr(shipper,{Orders.Ship Via}) = 0 then
(shipper := shipper + {Orders.Ship Via};
cnt := cnt + 1);
rowlabel := totext(cnt,0,"") + "-" + {Orders.Ship Via};
rowlabel

Use {@numberrow} as your row field in the crosstab instead of your usual row field, in this case, {Orders.Ship Via}. Add your column, e.g., {Orders.Order Date}, and summary fields, e.g., sum of {Orders.Order Amount}. Then while in preview mode, highlight one of the inner cells->format field->border->background->x+2 and enter:

if remainder(val(GridRowColumnValue ("@numberrow")),3)= 0 then crYellow else crWhite

Use the same formula to format the row total. Note that you remove the curly brackets from {@numberrow} and put it between quotes. Then select the row label field->format field->border->background->x+2 and enter:

if remainder(val(CurrentFieldValue),3)= 0 then crYellow else crWhite

This will work if your crosstab has only one row field.

-LB
 
Oops, I see you were looking for an underline. You can either use the same kind of formula for a bottom line of a border:

if remainder(val(GridRowColumnValue ("@numberrow")),3)= 0 then crSingleLine else crNoLine

...or you could go to the font tab->underline->x+2 and use, e.g.,:

remainder(val(GridRowColumnValue ("@numberrow")),3)= 0

-LB
 
Thanks, LBass for your reply. We're going to try it today!

The world is full of good people.
 
Clever notion, LB, I considered something like this, but I believe that your formula assumes that the rows are in natural order, which probably isn't the case.

If they return the rows in the same order as their row field(s), this may work, but then you have the issue of the Column grouping as well...

A manual crosstab should be simpler and not alter what is used as the row field.

-k

 
Please check out the FAQs on this and/or start a new thread, explaining what you are trying to do.

-LB
 
There is a good white paper on the BO web site that steps through the manual crosstab. It is a way of making something with formulas that looks like a crosstab, but you can do some things with it that a crosstab won't let you. It can be a lot of work but is very useful at times.

The world is full of good people.
 
Manual cross tab white paper: Just looked on the BO web site.
Now I can't find it but I know there used to be one!

The world is full of good people.
 
Sorry for multiple tiny posts - I found a manual crosstab FAQ on this forum that looks like it goes beyond the one I remember from Crystal's site.

The world is full of good people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top