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

Splitting a Crosstab across pages

Status
Not open for further replies.

IanWaterman

Programmer
Jun 26, 2002
3,511
GB
CR10 Oracle10

Oracle 10 does not have the Pivot function available on Oracle 11.

I am working on an insurance document where a cross tab should provide the layout of data required. There can be up to 20 drivers on a policy and I must show 4 drivers per page.

However, with another cross tab I must show Driver claims details also on page 1
Page 1
Driver 1 Driver2 Driver 3 Driver 4
Tabular details

Claims
Driver 1 .......
Tabular details

Page break

Drivers 5-8 and so on

page break

drivers 9-12

I do not know in advance how many drivers are on policy, in the future some drivers can be deleted and thus when doc reprinted drivers must be suppressed and then Driver 5 must appear as driver 4 etc.

Any ideas

Ian
 
Create a formula like this:

whilereadingrecords;
numbervar cnt := cnt + 1;
numbervar i;
numbervar j;
numbervar x := 4; //number of instances per group
for i := 1 to 3000 do(
if cnt in (i*x)-(x-1) to (x*i) then
j := i
);
j

...where 3000 is some estimated number greater than the total number of records. Because this is "whilereadingrecords" you can't use an actual count.

Insert a group on the formula, place the crosstab in the group header and format the group footer to "new page after" (not onlastrecord).

-LB
 
Thanks for this however, I am now not so sure cross tab is the answer. Might have to do something in the database.

Ian
 
Why do you say this? Did you try my suggestion? What happened? I did test this.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top