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

keeping subreport together URGENT

Status
Not open for further replies.

manjyo

Programmer
Jul 2, 2003
15
IN
hi
i m having one main report and one sub report inserted in the detail section. for each record in the main report it will call the sub report. i m having column named type in main report and having valued 1, 2 and 3. i want the sub report should be keep together for the type 2 and 3. ie if the data of type 2 and type 3 should not accomadate along with type 1 in one page then 2 and 3 should move to the next page. type 2 and 3 should print always together

thanks in advance


manoj
 
In the main report, you might try going to format->section->details->keep together->x+2 and entering:

{table.type} in [2,3]

I can't really test this, but in theory this should work.

-LB
 
hi
thanks for u r suggession. i tried this one. but its not working. is there any other methode?

thanks in advance

manoj
 
Here's another method that should work for Crystal 8.5, though I have not used the exact procedure.

Turn your detail line into two detail lines, one for type 1 and one for types 2 or 3. Each gets suppressed for the wrong type, I assume you know how to do this.

Place the subreport in each detail line. But for the detail line types 2 or 3, click the Format Editor and select [Keep Object together].

Please let me know if this works. Also whether it slows the report--I figure it shouldn't, because a suppressed section is then ignored.

Madawc Williams
East Anglia, Great Britain
 
hi Madawc Williams
thanx for u suggession. i tried what u said, but still not working. still type 2 is printing along with type 1 and type 3 on the next page. im using crystal report 9. is anybody is having some solution for it

ragards

manoj
 
Is there no a "keep together" also on the subreport object Format editor itself in the main report???

The trouble with formatting the sections with a keep together is that Crystal kinda forgets about the main report while in the subreport.

So in the conditional suppress for the "Keep Together" for the Subreport object put the formula

{Table.type} <> 1

That might do it.

Jim Broadbent
 
hi Jim Broadbent
thanx for ur suggession. i tried as u said. but it is not working at all. i im having only type 1 and type 2 then it ll work. otherwise not.

regards

manoj
 
well then it is a problem with the TYPE 3 report itself.....not the &quot;Keep Together&quot;

Is it possible that the Type 3 report is in fact too big...or is there a linking problem for that type of report.

When you say it doesn't work .... what happens???? explain.

Jim Broadbent
 
How about creating an inner group in the main report using the following formula {@grptypes} to group on:

if {table.type} = 1 then 1 else
if {table.type} in [2,3] then 2

Suppress the group header and footer. Go to report->change group expert->select {@grptypes}->options and check keep group together.

-LB
 
hi Jim Broadbent
i think it is not working because the main report is calling the sub report 3 times, for Type1, Type2 and Type3. it it calls Type2 and Type3 together then i think it will work. but in my case it is not possible. The Type3 report is not too big and there is no linking problem.

thanx for ur suggesstion

regards

manoj

 
Show the structure of your report....is each subreport in a separate subsection??? They should be.

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top