[RESOLVED] DESPARATE! - PageBreak still repeating
:cry: Hi All,
I have been struggling for weeks on this silly report just to get the pagebreaks right. I have had good input here on the SHAPE recordsets, and my report almost works, BUT it repeats a pagebreak for each detail record, so I get many multiple pages.
My Data example
AreaField Radius
Trade .5
Trade 1
Trade 2
Market .5
Market 2
Store 1
Store 2
Store 3
======================================================
My report should break for 3 pages from above, but it breaks for each line and repeats the correct details for it???
=======================================================
My code:
SHAPE {SELECT AreaField FROM ns_Report_Data}
APPEND ( ( Shape{SELECT Radius, AreaField FROM ns_Report_Data}
Append({Select Radius, POPULATION_CY, POPULATION_PY FROM ns_Report_Data} As Details
Relate Radius To Radius)) As PageBreak
Relate AreaField To AreaField)
Sorry, the code doesn't line up too good here. I reallly would appreciate any input here. This shouldn't be so difficult.
Thanks
Re: DESPARATE! - PageBreak still repeating
It sounds like you have set the ForcePageBreak property of the Details Section, when the break should occur on one of the Group Sections - probably the AreaField group.
Attach the DSR file.
1 Attachment(s)
Re: DESPARATE! - PageBreak still repeating
Bruce, I am so sorry to keep bothering you. I will never do another report again after this... I have zipped the whole thing with database.It is really very small and simple. But obviously I have been struggling until I can't make sense anymore.. This is the last report, my butt is on the line here.
THnks so much again.. :wave:
Re: DESPARATE! - PageBreak still repeating
It is not entirely clear to me how you want the report to appear (as far as groupings go).
However, the problem is more with your SQL Statement. I don't think I could explain it properly so just try this statement to see the difference in the report.
VB Code:
strQuery = "SHAPE {SELECT [B]Distinct[/B] AreaField FROM ns_Report_Data} " & _
"APPEND ( ( Shape{SELECT AreaField, [B]ObjectId[/B] FROM NS_Report_Data} " & _
" Append({Select Radius, POPULATION_CY, POPULATION_PY, StoreNo, Address, State, City, RAC_WHITE, RAC_BLACK, RAC_ASIAN, " & _
" RAC_HISP, HOUSEHOLD_CY, POP_AGE_MED_CY, OWNED, EMPLOYED, VEH_AVG, INCOME, " & _
" POP_GRP_QTR_CY, [B]ObjectId[/B] FROM ns_Report_Data} As Details " & _
" Relate [B]ObjectId To ObjectId[/B])) As PageBreak " & _
"Relate AreaField To AreaField)"
Re: DESPARATE! - PageBreak still repeating
Bruce, I appreciate the reply. That didn't quite work.. The results I need are to have all the data for each Radius or Areafield (same difference) on a page by themselves.. I want the page to break when the AreaField value changes... I really, really appreciate this,
Thanks again
Debbie
Re: DESPARATE! - PageBreak still repeating
Try this
VB Code:
strQuery = "Shape{SELECT Distinct AreaField FROM NS_Report_Data} " & _
" Append({Select AreaField, Radius, POPULATION_CY, POPULATION_PY, StoreNo, Address, State, City, RAC_WHITE, RAC_BLACK, RAC_ASIAN, " & _
" RAC_HISP, HOUSEHOLD_CY, POP_AGE_MED_CY, OWNED, EMPLOYED, VEH_AVG, INCOME, " & _
" POP_GRP_QTR_CY FROM ns_Report_Data} As Details " & _
"Relate AreaField To AreaField)"
In the report.
Move the AreaField control that is in the first Group Header into the second Group Header.
Delete the first Group Header.
Set the ForcePageBreak property of the second (now first) Group Header.
Re: DESPARATE! - PageBreak still repeating
Bruce, I am so thrilled, that was the last of my reports. There were all due tomorrow, you really saved my butt.. I don't ever want to do that again.
Thanks so much for you help
Debbie