Alpha Video Training
Results 1 to 9 of 9

Thread: Sort order of Sub reports

  1. #1
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default Sort order of Sub reports

    Hi
    Have problem sorting a sub report.

    The main report has 5 columns and is
    sorted alphabetically by field1.

    In the report footer I have set up
    a sub report,
    filter: "field2" " 2
    sort : "field3" (numeric field, in descending order)

    The sub report filters and correctly prints the
    selected records.
    However the sort order remains alphabetical, field1.

    I had this same problem several years back, never found
    the answer and gave up.

    What am I missing?

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Sort order of Sub reports

    Describe the table or set the report is based upon. For example, is the subreport based on a linked one to many child?

    -- tom

  3. #3
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default RE: Sort order of Sub reports

    Tom
    The main report and subreport is based
    on a single table.

    No child records or any other links.

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Sort order of Sub reports

    I thought so.

    From the docs:


    A sub-report is an entire report that is placed in the Detail area of another report. Its main purpose is to display data from tables linked in a set using one-to-many links at the same level.



    I suspect most of us use sub-reports to display child table records in a one to many set.

    Not sure you'll be able to achieve what you're shooting for using a single table.

    -- tom

  5. #5
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default RE: Sort order of Sub reports

    Thanks Tom

    Can I conclude
    1. Putting a sub report into a page footer is
    not recommended?

    2. It is not possible, with a single table,
    to have a sub report sorted in an order which
    differs from the sort order of the main report?

    Ayt present the sub report does filter and print records
    correctly whilst sitting in the page footer.
    It's just the sort order that's the problem.

    I am sticking at this problem, since for the past few years
    we have had to print two separate reports in AlphaV and then physically stick one report down on the other before giving the page to our printer!

    If you can confirm that it's not possible to do this then
    then I will try a workaround - based on two tables,
    one sorted on field1 alphabetically and one sorted in filed2 numerically, descending.

    Much appreciate your help.

  6. #6
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default RE: Sort order of Sub reports

    Apologies -
    Prev message - the sub report sits
    in the report footer,
    not the page footer.

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Sort order of Sub reports

    Kevin,

    I'm sorry but I cannot speak authoritatively on this. Have never attempted what you're trying. Maybe if you supply a sample table and its dictionaries some of us will be able to take a fresh look at the problem for you.

    -- tom

  8. #8
    Member
    Real Name
    Kevin Gilroy
    Join Date
    Dec 2001
    Posts
    232

    Default RE: Sort order of Sub reports

    Tom
    Think I have cracked it.
    The clue was your reference to a child table.

    1. From table1, export the records required in a sub report to table2, using the filter and order features
    in the export operation.

    2. Make a set master table = table1
    child table = table2
    on a one to many link (or one to first.)

    Design the main report on the new set,
    using records from table1 for the main report.

    Insert a sub report in the report footer.

    In the sub report insert the required records from
    child table2.

    Set the order feature on the sup report as required -
    in my casev invert(field2)- a numeric field - to get highest to lowest in descending order.

    Being able to produce a report like this on a single page
    will save us endless "pasting up".
    Not only that, we can now produce the report as a single
    PDF file!

    Hope this helps anyone else with similar requirements.
    Thanks for your help.

  9. #9
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Sort order of Sub reports

    Kevin,

    You're welcome, and congratulations! I'm tickled that you got it going in a way that will be automatic for the user.

    -- tom

Similar Threads

  1. sort by Biblical order
    By Philip Ramstad in forum Alpha Four Versions 7 and 8
    Replies: 7
    Last Post: 06-05-2005, 01:13 PM
  2. Browse Sort Order
    By Jeffrey Wolfe in forum Alpha Five Version 5
    Replies: 4
    Last Post: 08-21-2004, 09:32 PM
  3. Report sort order
    By Edward F. Schulz in forum Alpha Five Version 4
    Replies: 6
    Last Post: 11-09-2002, 01:16 PM
  4. Sort Order
    By Juli Carey in forum Alpha Five Version 4
    Replies: 7
    Last Post: 11-08-2001, 03:33 AM
  5. Letter Sort Order
    By John Oesterle in forum Alpha Five Version 4
    Replies: 0
    Last Post: 05-18-2000, 08:21 AM

Bookmarks

Posting Permissions

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