please follow the following steps.
1. create one more section in details. now u will have detail a and detail b
2.create three formulas in main report
1st formula field is "initival" (to declare variables) it contains below variable
shared numbervar xx :=0;
place this initval in page header and supress it. this will make the value of shared numbervar xx to 0 every time a new page is invoked.
now take one more forumula field "mreccnt" to count no of records printed in the page. the syntax would be as below
shared numbervar xx := shared numbervar xx + 1;
place the "mreccnt" in the details a section and supress it.
now the third formula field "lreccnt" to count maximum record no printed.
the syntax is as follows
shared numbervar yy := shared numbervar yy + 1;
place the third formula field "lreccnt" also in details a section and supress it.
now in the details a section put the 20 columns which is to be printed.
now in section expert of details a do the following
check the option new page after and write the formula
{mreccnt} = 49 (this will allow the print only 49 records, if you want to print more records the put a value accordingly) and save it.
now in details b section do the following
add a sub report in detials b section, this subreport contains the remaining 10 columns
now edit the subreport and create the following 4 formulas.
the 1st formula is "subinitval" (to declare variable) it contains the following syntax
shared numbervar subcnt :=0;
place this "subinitval" in the report header and supress it so that shared numbervar subcnt will be initated to 0
now create the second formula "subreccnt" the syntax is as follows
shared numbervar subcnt := shared numbervar subcnt + 1;
place this formula "subreccnt" in the details section of subreeport and supress it (this is will count the no of records printed)
now create third formula "endrc" the syntax is as follows
shared numbervar yy; (this brings the maximum record printed on each page in the main report)
now create fourth formula "strtrc" the syntax is as follows
{@endrc}- 49; (this is to print only 49 records is subreport also, if u want more records change the value accordingly, but both the value should be same in main and sub report)
place the formula "strtrc" and "endrc" in report header section of the subreport and supress it.
now go to section expert of the details section of subreport.
check the supress button and in the formula tab write the following formula
{@cnt} <={@strtrc} OR {@cnt} > {@endrc};
save it and ur done..
this exactly works ur requirement.
here are some more clarifications
for page 1 of main and subreport the values will be as follows
first in main report there would be 49 records printed for 20 columns.
the value of mrrecnt will be 49 (last record no)
the value of lrrecnt also will be 49. ((to dispaly only 49 records in main report)
these values are passed in the subreport
the value of endrc would be 49
the value of strtrc would be 0
in section expert the records satisfying the follwoing condition will be supressed
({@cnt} <=0 or {@cnt} > 49)
based on these values the data in details of subreport will be displayed and supressed.
for page 2 of main and subreport the values will be as follows
first in main report there would be next 49 records printed for 20 columns.
the value of mrrecnt will be 98 (last record no)
the value of lrrecnt also will be 49. (to dispaly only 49 records in main report)
these values are passed in the subreport
the value of endrc would be 98
the value of strtrc would be 49 (98-49)
in section expert the records satisfying the follwoing condition will be supressed
({@cnt} <=49 or {@cnt} > 98)
i hope i tried my best approach to solve your problem.please let me know if you have any doubts