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

Formatting issue in drill down report

Status
Not open for further replies.

mycrystalbaby

Programmer
Jun 16, 2005
42
US
I have a drill down report and I would like to format a field in column wise. e.g, I have 3 values coming from same field which goes one after another in details, but I would like to format that in a way, so user reads it as

A B C
1 2 3

Instead of single column

A

1
2
3
 
I'm not sure why the drill-down is relevant. You can either insert a crosstab using the field as the column, or you could go to the section expert->details->format with multiple columns->layout tab->select the width and gap->format groups with multiple columns.

-LB
 
Thanks for reply back.
Actually this report has 4 levels of drill downs and this field needs to be placed at detail section.
So we can’t use the cross tabs or multi columns here.
it is drill down from

Group1
Group2
Group3
Group4
details


 
Then you need to use the format with multiple columns approach.

-LB
 
That does not work, as I have many other fields in details section.

Let me explain tit again, e.g
I have three values for A and I would like to display those in column wise..

but along with A, I have 5 another fields, which do not need any change.
 
That doesn't really explain anything. Please show what you want the detail section to look like, including ALL fields. Since the "A" values are in different rows, you can't place them in one row with other values. Is the problem that you have the other fields repeating per A value? If so, you could create a group based on some field that repeats for all values of A, and then you could collect the A values into one row (using a variable) to show in a group footer, and then drag the other fields into the group footer.

I'm just guessing here, as you have not provided sufficient information.

-LB
 
Thats right, other fields are repeating for A.
I tried your approach
and added a formula

whileprintingrecords;
stringvar x;
stringvar array arrayX;
numbervar counter;
counter:=counter+1;
redim preserve arrayX[3];
ToText({PWR_POWER_BY_STRIP_COMMAND.DEVICE_NLOAD_AMPS},1);
arrayX[counter];


And the crated three formulas out of this to display 3 times in columns, but something somewhere is wrong..
I am not sure, how to resolve this fully
 
Use three formulas, assuming you have inserted the new group:

//{@reset} for the group header:
whileprintingrecords;
stringvar x;
if not in repeatedgroupheader then
x := "";

//{@accum} for the detail section:
whileprintingrecords;
stringvar x := x + {table.A} + " ";

//{@display} for the group footer:
whileprintingrecords;
stringvar x;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top