Results 1 to 8 of 8
  1. #1
    jc_msa is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Posts
    10

    Draw vertical lines between subreports


    I have a report that contains 5 subreports. 2 reports at the top. 1 report in the middle. 2 reports at the bottom.

    AccessSubReports.zip

    In the report designer, I am able to draw the 3 (blue) horizontal lines between the subreports and these lines move to the correct positions if the subreport grows. However I would like to draw the (2 orange) vertical lines to separate the subreport on the left from the one on the right.

    I have added 2 vertical lines in the report designer. My plan was that I would then set the Top and Height of these lines when the report is opened. I would open the report the first time and store the position of the horizontal lines. I would then close and reopen the report and set the Top and Height of the vertical lines as I need them.

    I am able to draw the top Vertical line perfectly. However although I set the Top and Height of the 2nd vertical line, to go between the 2 and last horizontal lines, Access seems to add an offset to this Top and therefore does not print line between the 2 horizontal lines. Is there an offset when Top is set? How do I determine this offset?

    Is there a different way to draw vertical lines? Obviously the subreports may get longer / shorter and therefore I do not know the exact positions of the lines until runtime.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,056

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,818
    Following on from the last post, Access MVP, Crystal Long, has several articles on this topic.
    For example Draw Lines and Boxes on Access Reports (msaccessgurus.com)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    jc_msa is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Posts
    10

    Resolved

    Quote Originally Posted by CJ_London View Post
    Hi,Thank you for your help. I have managed to draw the vertical lines using the article you quoted.

  5. #5
    jc_msa is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Posts
    10

    Thumbs up Draw line between 2 sub reports

    I have a report with multiple subreports. One of these subreports shows a number of entries. Another subreport shows of the these entries broken down into its components. For example the first subreport shows Investments by Type. One of these investment types is Cash. The other subreport shows the banks in which the cash is held. In order to show that the Cash report is a breakdown of the Investment Type report, I want to draw a line from the Cash row in the Investment Report to the Cash Report. This is shown in the attachment.


    Click image for larger version. 

Name:	ReportDetail.png 
Views:	29 
Size:	17.6 KB 
ID:	49592

    I would like to draw the green line from the Cash row to the Cash Report. If this is not possible, is there another way to highlight that the Cash Report is a breakdown of the Investment Report - Cash entry?

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,056
    as far as the report.lines are concerned, not possible since these can only be horizontal or vertical. You may be able to with a line control (without the arrow) but there are two issues - the first is to determine the start and end points of the line since these could vary if the order of the list varies and pretty sure you cannot draw a line over the top of a subreport (or form), it will sit behind it regardless of 'on top' - you will have to experiment.

    Alternatives:
    have the line drawn from the edges of the subreports, you will still need to calculate the start position
    given the list nature of the subreports, use a listbox instead
    use colour to identify the connection.

  7. #7
    jc_msa is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Posts
    10
    Quote Originally Posted by CJ_London View Post
    as far as the report.lines are concerned, not possible since these can only be horizontal or vertical. You may be able to with a line control (without the arrow) but there are two issues - the first is to determine the start and end points of the line since these could vary if the order of the list varies and pretty sure you cannot draw a line over the top of a subreport (or form), it will sit behind it regardless of 'on top' - you will have to experiment.

    Alternatives:
    have the line drawn from the edges of the subreports, you will still need to calculate the start position
    given the list nature of the subreports, use a listbox instead
    use colour to identify the connection.
    Report.lines can be diagonal. My difficulty is determining the start and end points of the lines. I do not know that there is a way to determine the location of a row within a report.

  8. #8
    jc_msa is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Posts
    10
    Sorry I just realized that this was posted to an existing Solved thread. I will post to a new thread.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 10-14-2019, 10:08 AM
  2. Replies: 6
    Last Post: 03-16-2019, 08:53 AM
  3. Replies: 9
    Last Post: 06-15-2017, 03:00 PM
  4. How to draw a vertical line on a sub form
    By hassan.tajdar in forum Forms
    Replies: 4
    Last Post: 05-09-2017, 08:47 PM
  5. Can I draw Binary Tree in Forms or excel?
    By selvakumar.arc in forum Access
    Replies: 1
    Last Post: 05-30-2013, 11:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums