Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    Eastern Pennsylvania, Pennsylvania, USA
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    record sort in report

    I need to generate a report (8 1/2 x 11) that lists table records. However, if there is 100 records in the table, I need to have records 1 to 50 on the top 1/2 of the report, and records 51 to 100 on the bottom half, so the report can be cut in half and stacked, and end up in sequence. Any suggestions are appreciated. Thanks.........

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: record sort in report

    When you say the "top" or "bottom" half of the report, are you talking about cutting pages in two, or what? Are you cutting 8-1/2" x 11" pages in half for some reason? To what purpose? Yes, I know you want to stack them in order, but why don't you just print them on smaller paper in the first place?
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Mar 2001
    Location
    Eastern Pennsylvania, Pennsylvania, USA
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record sort in report

    Charlotte, Thanks for the reply. I do not know whay the print dept. needs to use 8 1/2 x 11 stock and cut it in half, but they do. So the question remains, can I sort so one page has record #1 on the top half, and record # 51 on the bottom half? (assumung 100 records) Thanks Again

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: record sort in report

    There are a couple of ways (some tongue in cheek!). The easiest is to configure you report so it only prints on 1/2 sheet of paper. Then when they cut the report in 1/2, they will throw out 100 1/2 sheets that are blank.

    Technique #2 is really contrived. Again configure your report to print on 1/2 sheet. Make sure the query for your report's recordsource specifies TOP 50. Run the report. Now, put the paper back in the printer, but turn it over and around. Configure you report sorting options to be in Descending order (assuming it was in ascending order before), and keep TOP 50.

    Technique #3. Look at them like they are complete idiots. Then ask why they need to do that. Then offer better method.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: record sort in report

    Technique #3 is the one I prefer in thsese circumstances. <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    Technique #2 can lead to streaks and smears on the output because of the toner already on the paper when you pass it through a second time. If you do select this technique, you'll need to be very careful about running cleaner sheets through the printer in between runs.
    Charlotte

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: record sort in report

    >>Technique #2 can lead to streaks and smears on the output because of the toner already on the paper when you pass it through a second time. If you do select this technique, you'll need to be very careful about running cleaner sheets through the printer in between runs.<<

    Yes, but at that point it becomes a hardware issue, and is therefore out of my hands!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: record sort in report

    Now that's downright sneaky, Mark! <img src=/S/grin.gif border=0 alt=grin width=15 height=15> <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15> We need a smilie for passing the buck. Oh, Drk ...
    Charlotte

  8. #8
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record sort in report

    Technique 4

    Create temporary table with necessary fields
    Fill temporary table via code with Record 1, 51, 2, 52...
    Base report on temporary table.

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: record sort in report

    Actually, I did exactly that once when I got this kind of insane request. Only in my case, there were thousands of reply cards and they wanted them printed, with names and addresses (to look nice, you know) two to a sheet, which would then be cut in two and collated. I left that job a few months later. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: record sort in report

    Well, I learned a long time ago that if you learn how to do someone's job, THEY WILL LET YOU!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: record sort in report

    Such a temporary table would only be practical if the number of records was static, or if you created the table through code such that you could adjust for the total # of recods. That is, if there were 110 records, your sequence would be 1,56,2,57, etc.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  12. #12
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record sort in report

    The table structure is independant of the number of records! One can create the temporary table by hand.

    If one does go via this method then one needs to test how many records there are before starting to fill the table from code, except for the rare instances that one guarentees a consistant number of records. I didn't bother pointing that out as this appeared a rather more theoretical discussion of general techniques.

  13. #13
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: record sort in report

    I know the table structure is independant of the # of records, but the content isn't. You have to redo the contents based on the number of records. And it seems like it would be a pain to have to do this manually.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  14. #14
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record sort in report

    Actually I think it is simple and straightforward. Roughly as follows

    1) Delete contents of temp table
    2) Get recordset of source
    3) Get recordset based on temp table
    4) Find first record in source
    5) Append record to temp table recordset
    6) loop through source records fields and copy field contents to temp table field of same name
    7) Find next record and continue with steps 5 and 6


    One doesn't require all the field names in the code, only those required for one to determine the sort order.

    (To create the initial table run the source query as create table query, then modify as required.)

  15. #15
    Star Lounger
    Join Date
    Mar 2001
    Location
    Eastern Pennsylvania, Pennsylvania, USA
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: record sort in report

    <img src=/S/confused.gif border=0 alt=confused width=15 height=20>..Thanks to all for the replies....We are just having a ball with this one !!! Of the many wonderful suggestions, I believe the one I will go with is....."Sorry folks, MSAccess isn't capable this type of procedure, but I put in a call to Bill G., and as soon as he gets back to me, I'll get him on the problem."....Think that'll work ?

Page 1 of 2 12 LastLast

Posting Permissions

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