none
Vertical Lines in report Details section across pages when Can Grow is set to Yes RRS feed

  • Question

  • I have a program that creates quotes for a customer with code that draws vertical lines in the details section of a report in the quote. There is a subreport in the details section that can grow to make the quote several pages long. I can create vertical lines in the first page of the report with my code, but I can't figure out how to use VBA to get the lines on subsequent pages. Any ideas would be appreciated.
    Thursday, April 19, 2018 3:55 PM

All replies

  • Hi Bob,

    Is your code using the Line statement? Have you considered using a Stacked Layout and turning on the gridlines?

    Just a thought...

    Thursday, April 19, 2018 3:58 PM
  • Yes, I am using a line statement to draw the lines. I need to control the exact placement (horizontally) of the lines so I don't think gridlines are the answer. My problem is how to create code that will draw lines in the details section only on page 2 and any other subsequent pages. I have tried adding code to the On Page event for the report but haven't isolated the lines to just the details section on page 2.

    If Page = 1 then
    ...
    Else
    ...
    End If

    Thursday, April 19, 2018 5:36 PM
  • Hi Bob,

    If the lines are in the Detail section, try using the Format event of the Detail section.

    Not sure how using gridlines won't work without seeing your report setup/design. Are they very different from this one?

    Cheers!

    Thursday, April 19, 2018 6:02 PM
  • I figured it out. I put the code in the sub report's detail On Print event, not the parent report's detail On Print. Works great.
    Thursday, April 19, 2018 7:15 PM
  • Hi Bob,

    Congratulations! Glad to hear you got it sorted out. Good luck with your project.

    Thursday, April 19, 2018 7:48 PM
  • Hello Bob,

    I'm glad to hear that you have solved the issue. I would suggest you mark any helpful reply or your solution as answer to close this thread. If you have any other issue, please fell free to post threads to let us know.

    Thanks for understanding.

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 20, 2018 5:12 AM