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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross-tab Report -- Adding a row number to the row label 1

Status
Not open for further replies.

roerunner

Programmer
Feb 1, 2006
10
US
(Using CR 9.1.5 for ASP.NET 1.1)

I would like to add a row number to my cross-tab report. I'm pretty new to formulas, so I'm not quite sure how to do this. Any help would be appreciated!


For reference, here is the basic format of my report (what I would like to add is highlighted):

[tt] 1. Some question here... 2. Another question here...
[COLOR=green yellow]1. [/color green yellow]John YES NO
[COLOR=green yellow]2. [/color green yellow]Sally YES NO
[COLOR=green yellow]3. [/color green yellow]Michael NO NO
[/tt]


-----
Kelly
 
For the field that has the Name, use a formula instead and concatenate the RecordNumber to the Name ( Probably have to use a ToText() function..Use the formula for that part of the Xtab..






[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
You should supply your table(s) format and example data.

You may find it easier to do this in a Stored Procedure, depending upon the data source (please post the database/connectivity used).

-k
 
You can do this by creating the following formula {@seq}:

whilereadingrecords;
numbervar cnt;
stringvar x;

if instr(x,{table.name}) = 0 then
(
x := x + {table.name} + ", ";
cnt := cnt + 1
);
totext(cnt,0,"")+". "+{table.name}

Use this as your row field. While the row field is selected in the crosstab expert->group options->options->customize group name->use a formula->x+2 and enter:

if val(left({@seq},2)) = 0 then
mid({@seq},3) else
if val(left({@seq},1)) = 0 then
mid({@seq},2) else
{@seq}

-LB
 
Thanks lbass,

I actually used the similar solution you provided to have alternate row color in a crosstab -- thread767-1154875. Thanks for your help!!

-----
Kelly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top