Advertisement

04.04.2008 at 10:45PM PDT, ID: 23298015
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

How to draw a vertical line between two columns on an Access Report?

Asked by Kumba42 in Access Reports, Microsoft Access Database, Access Coding/Macros

Tags: , , ,

So I have been working on this Access Report that essentially lays out a schedule of events for various activities at my company.  We currently generate these things using Excel spreadsheets and Adobe InDesign, via add-on plugins (InData, InFlow).  The problem is, we're pushing the limits of InData pretty hard, and so I've decided to try and re-engineer the things in Access.  We'll still output the data in Excel, then pull it into the Database, and generate a report off of a template to match the data and all, buuuuutt, back story aside, here's the problem:

How do I draw a vertical line as a break between columns?

And no, the "draw it in pieces in each groupheader/detail/groupfooter section" method is utterly failing.  Here's why:

The Data in the file basically defines a series of events, one per record.  These events have a title, displayed in a large bold font, and optionally, a note or location.  In the sample report attached here as a picture (heavily photo edited to identify the areas and remove irrelevant info), the black boxes under the date headers would be the Event title, the pink boxes the optional note, and the red boxes the optional location.  Either the note, location, both, or neither may be present.

Obviously, this makes properly determining the height of the Detail section rather difficult, since the size of the boxes can change depending on their text data, so drawing the vertical line in piece meal is not easy.  Instead, the bulk of the line is drawn via the Me.Line method in Detail_Print(), BUT in the left-hand column, if we run out of data to output, the line stops being drawn early!  Behavior not desired.

We want the vertical line to run from a little after the top black line to a little before the bottom black line.  What happens in the right hand column doesn't matter, as that's off the edge of the report and so it isn't visible.

Now the current method I've been working on, which is sometimes working and sometimes not, is to print out all of my detail items for that group.  Then, I try to do some math by summing up the heights of the various outputted text boxes and labels to guess the height of that detail section (in twips) as it was drawn.  I repeat until the end of detail, and then, in theory, I have my total height of the detail section in twips.

I then take that number, and subtract it from a larger number that I made up using arbitrary measurements of the page (It's supposed to be the total available area in the report that detail data can be printed in; i.e., maximum size of the columns).  The resulting value I set to the Height property of the group footer.  The group footer extends, theoretically, the end of the available area, drawing the remainder of the column break line with it.  In the photo, that's what the grey "Gap Filler" box is.  On some of the other generated pages, we get odd output, like the height calculations are off, causing the group footer to end almost 1-2 inches above the Page footer, and on others, it's almost perfect.  This baffles me greatly.

So, I'm wondering if there are any saner ways, either in VBA or through the Win32 API, to draw a line on that report, vertically, in the center, dividing the columns?  And have that line show up in print output?  Google's been rather unhelpful as of late, though I have found a couple of rather interesting code snippets.

Oh, and the little numbers all over the picture is my debugging data....like the heights (in twips) of each box as it's drawn (the red, pink, and black numbers only).


Anyone got any thoughts on how to approach this?  I'll take actual code, pointers to URLs explaining things, or suggestions on how to better do this.  Ya'd think Access would have internal logic to handle the drawing of a column break line, but it seems it's either an inherently difficult thing to do, or just a feature that was left out (funny enough, I didn't see it in a trial copy of Crystal Reports either).Start Free Trial
Attachments:
 
Photo-edited Sample Report
Photo-edited Sample Report
 
 
Loading Advertisement...
 
[+][-]04.05.2008 at 01:28AM PDT, ID: 21287451

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 01:55AM PDT, ID: 21287493

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 04:51AM PDT, ID: 21287819

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 08:00AM PDT, ID: 21288362

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 08:02AM PDT, ID: 21288365

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 08:26AM PDT, ID: 21288444

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 10:43AM PDT, ID: 21288955

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 11:56AM PDT, ID: 21289189

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 11:59AM PDT, ID: 21289201

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 12:03PM PDT, ID: 21289216

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 01:09PM PDT, ID: 21289426

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 04:06PM PDT, ID: 21289994

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 04:55PM PDT, ID: 21290103

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Reports, Microsoft Access Database, Access Coding/Macros
Tags: Microsoft, Access, 2000, Drawing a verticle line between two columns
Sign Up Now!
Solution Provided By: harfang
Participating Experts: 5
Solution Grade: A
 
 
[+][-]04.05.2008 at 05:22PM PDT, ID: 21290163

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 05:23PM PDT, ID: 21290167

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 06:36PM PDT, ID: 21290342

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.05.2008 at 06:42PM PDT, ID: 21290352

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.06.2008 at 04:19AM PDT, ID: 21291420

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.07.2008 at 08:35PM PDT, ID: 21302382

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628