Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Posts
    2

    Unanswered: Print lines on details section

    Hi everyone,

    I have a report with a details section with a variable number of records. The maximum records that can be entered is 17 and when the user enters that ammount of records the report looks how it should look (that is the full page is used), however when the user needs only any numbers of records between 1 and 16 the report has a blank space that should not be there. If there are less than 17 records I need the detail section after the last record to be filled only with the lines that divide the different fields.

    How it's possible to write a line in the details section where no record is present?

    Thanks,
    Amarilis

    PS. I forgot to mention that I'm using MS Access 2003 SP1 and Windows XP SP2
    Attached Thumbnails Attached Thumbnails Report1.bmp   Report2.bmp  
    Last edited by bluezaphire; 10-25-06 at 14:58.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Ah ... the dreaded empty records issue ... Since you have a max of 17 per page(or total) why not add blank records into the table/query the report runs on?
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I couldn't quite see your bmps very clearly but I had a check-writing report which wrote out checks and had lines of information on the reward items (a top stub and bottom stub) for the check amount and it was important that the check amount was written in a certain place in the middle of the report which may or may not be down the same lines as what you're trying to do (I'm not totally sure though). What I did with that was fill the report with empty text boxes (or labels) and wrote some code which opened a recordset on the OnFormat section of the report and populated the text boxes/labels cycling through the recordset. I'm not sure though if you're facing the same issue but it was a fairly complex report. If you think it fits what you're trying to do, I can upload a sample of the report.
    Last edited by pkstormy; 10-26-06 at 01:28.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Oct 2006
    Posts
    2
    Quote Originally Posted by pkstormy
    I couldn't quite see your bmps very clearly but I had a check-writing report which wrote out checks and had lines of information on the reward items (a top stub and bottom stub) for the check amount and it was important that the check amount was written in a certain place in the middle of the report which may or may not be down the same lines as what you're trying to do (I'm not totally sure though). What I did with that was fill the report with empty text boxes (or labels) and wrote some code which opened a recordset on the OnFormat section of the report and populated the text boxes/labels cycling through the recordset. I'm not sure though if you're facing the same issue but it was a fairly complex report. If you think it fits what you're trying to do, I can upload a sample of the report.
    If I understood what you did with your report well, that might help me with mine. I would appreciate if you upload a sample of the report (please let me know where I can download it from).

    In the meantime I'm working with another solution that I found. It isn't working exactly how I need it but I'm trying to work around that.

    Thanks,
    Amarilis

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Sample Check Writing

    Here's the sample but I couldn't supply the entire table structure because it get's pretty involved (there's a lot of tables and I made a very quick example). But at least you can get a feel for what it does even though it doesn't really work (you'll get errors when trying to open the report but again, just take a look at what it's doing behind the scenes - you don't really need to see the missing tables (which show the measures getting paid on) to get the concept). Also, there's a better routine I incorporated later on to getting the written check amount verbage verses the chopped code I have to write out the verbage of the check (I found the better verbage writing routine on this site which somebody got from a Microsoft link). Hope it helps even though I'm kind of embarrassed to upload it since it's not complete.
    Attached Files Attached Files
    Last edited by pkstormy; 11-01-06 at 22:33.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    The approach I used was to create a subreport that had the lines in it. The create one with the data. Then place the lines subreport on the report making it as big as the space you need to cover. Then add the data subreport on top of the lines. Make sure the data subreport has a transparent background.

    This approach is suited for situations where you have 'areas' of a report with different lines. For example if you have Area A that is 17 lines, Area B to the right of Area A that is 10 lines and Area C that is below Area B that is 7 lines.

Posting Permissions

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