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

Page Break in the SUBREPORT

Status
Not open for further replies.

CrystalReports9

Programmer
Jan 10, 2003
124
US
I have one mainreport & two subreports.

In one of the subreport retrives more than 8 rows then i have 2 skip into the new page. While skipping to the new page the Main report's RH,GH,GF,RF values also bring into the new page.
Question:
---------
How to acheive this ???


I Tried like :
--------------
In the subreport i controled the number of lines as 8 by using REMAINDER(Recordnumber,8)=0.

Question:
---------
Whether i have to set the option 'New page Before' in the main report or in the subreport.

Thank you
 
I think that I've watched you slowly give out your requirements here.

Consider that stating your needs up front will probably save a lot of time overall, the following tends to do so nicely:

Crystal version
Database/connectivity used
Example data
Expected output

This:

"In one of the subreport retrives more than 8 rows then i have 2 skip into the new page. While skipping to the new page the Main report's RH,GH,GF,RF values also bring into the new page."

Is a bit confusing, I assume that you mean that the subreport also has the main report's RH,GH,GF,RF, but you don't want it.

You might base suppression of the main report sections using a formula passed back from the subreport.

For instance the formula you used for the page break could also house a shared variable, as in:

whileprintingrecords;
shared numbervar SuppressHeaders;
if REMAINDER(Recordnumber,8)=0 then
SuppressHeaders := 1
else
SuppressHeaders :=0

Then back in the main report use something like the following for the section suppress formula:

whileprintingrecords;
shared numbervar SuppressHeaders;
SuppressHeaders = 1

-k
 
The subreport also doesn't has the main report's RH,GH,GF,RF.

I would like to explain further:

Main Report
-----------
<RH>
<PH> Tax Statement(Title)
<GH1> Municipality Property Number(Title)
<GH1a> <SUBREPORT_1>
<GH1b> <SUBERPORT_2>
<DETAIL>
<GF1> Net Tax (Title)
<PF> Payment option(Title)
<RH>

The '8 line' control to be done in <SUBERPORT_2>.

Assume that <SUBERPORT_2>'s gives 10 detail rows. In this
case the 10 rows to be splitted into two pages with 8row in one page and 2rows in another page.

While splitting into two pages i want the main report's info. like RH,GH,GF,RF,<SUBREPORT_1> to comes in both pages.

The output i want is
--------------------
Page 1 of 2
-----------
<RH>
<PH> Tax Statement(Title)
<GH1> Municipality Property Number(Title)
<GH1a> <SUBREPORT_1>
<GH1b> <SUBERPORT_2>
row1
row2
row3
row4
row5
row6
row7
row8
<DETAIL>
<GF1> Net Tax (Title)
<PF> Payment option(Title)
<RH>

Page 2 of 2
-----------
<RH>
<PH> Tax Statement(Title)
<GH1> Municipality Property Number(Title)
<GH1a> <SUBREPORT_1>
<GH1b> <SUBERPORT_2>
row9
row10
<DETAIL>
<GF1> Net Tax (Title)
<PF> Payment option(Title)
<RH>

Now I Hope u can help me be better. Thank u very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top