Results 1 to 7 of 7

Thread: [RESOLVED] DESPARATE! - PageBreak still repeating

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    193

    Resolved [RESOLVED] DESPARATE! - PageBreak still repeating

    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

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    193

    Red face 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..
    Attached Files Attached Files

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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:
    1. strQuery = "SHAPE {SELECT [B]Distinct[/B] AreaField FROM ns_Report_Data} " & _
    2.         "APPEND ( ( Shape{SELECT AreaField, [B]ObjectId[/B]   FROM NS_Report_Data} " & _
    3.         "           Append({Select Radius, POPULATION_CY, POPULATION_PY, StoreNo, Address, State, City, RAC_WHITE, RAC_BLACK, RAC_ASIAN, " & _
    4.         "                     RAC_HISP, HOUSEHOLD_CY, POP_AGE_MED_CY, OWNED, EMPLOYED, VEH_AVG, INCOME, " & _
    5.         "                     POP_GRP_QTR_CY, [B]ObjectId[/B] FROM ns_Report_Data} As Details " & _
    6.         "                  Relate [B]ObjectId To ObjectId[/B])) As PageBreak " & _
    7.         "Relate AreaField To AreaField)"

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    193

    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

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: DESPARATE! - PageBreak still repeating

    Try this

    VB Code:
    1. strQuery = "Shape{SELECT Distinct AreaField FROM NS_Report_Data} " & _
    2.         "           Append({Select AreaField, Radius, POPULATION_CY, POPULATION_PY, StoreNo, Address, State, City, RAC_WHITE, RAC_BLACK, RAC_ASIAN, " & _
    3.         "                     RAC_HISP, HOUSEHOLD_CY, POP_AGE_MED_CY, OWNED, EMPLOYED, VEH_AVG, INCOME, " & _
    4.         "                     POP_GRP_QTR_CY FROM ns_Report_Data} As Details " & _
    5.         "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.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Posts
    193

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width