Sorry, these are different instances of the same field.
I am looking at using log() and then exp() functions to get the result I want. But if you have a simpler solution, it would be great and your response is much appreciated.
Not sure whether you have more than one column in your crosstab, and the solution is slightly different depending. We'll call your rowfield {table.row}, and we'll call the topmost instance of {table.row} in your crosstab "TopRowLabel", and your field containing X1,X2,X3, etc., {table.field}.
Insert a crosstab, add {table.row} as your row, and add {table.field} as your first summary. Create a formula:
whilereadingrecords;
0
Add this as a second summary to the crosstab. Then select the first summary, right click->format field->common->suppress->x+2 and enter:
whileprintingrecords;
numbervar k;
numbervar j := j + 1; //use this if there is only one column
if GridRowColumnValue("table.row") = 'TopRowLabel' then
//use the above line if more than one column else use the next commented out line:
//if j = 1 then
k := currentfieldvalue + 1 else
k := k * (currentfieldvalue + 1);
false //make this "true" if you don't want to display {table.field}
Then select the second summary field->right click->format field->common->display string->x+2 and enter:
whileprintingrecords;
numbervar k;
totext(k,0); //assuming you don't want decimals
Note that the use of the gridrowcolumnvalue line is necessary to reset the value of k per column. Otherwise the report could be more automated by using the counter j.
Note that this solution makes use of a solution provided by Ken Hamady in one of his newsletters re: using a running total in a crosstab.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.