Help!

Grow Vertical Line

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Reports RSS
Next:  Default value in table field (username and comput..  
Author Message
Proposal Doctor
External


Since: Mar 25, 2009
Posts: 1



PostPosted: Wed Mar 25, 2009 7:18 pm    Post subject: Grow Vertical Line
Archived from groups: microsoft>public>access>reports (more info?)

I have a report that is based on a government form that has several vertical
lines. One of the lines in the report needs to be pegged to a horizontal
line and to grow downward if information in one of the fields on either side
of the line increases by more than four lines. The bottom of the line needs
to stop at the intersection of another horizontal line. (I have been solving
this by opening the report in design view and extending the line manually.
That's getting old and other users won't know what to do.)

I have tried the Me.Line technique on the MS website and either I am missing
something or it doesn't work in Access 2007. Has anyone gotten Me.Line to
work with Access 2007? Is it possible to peg the bottom of a growing line to
a horizontal line?

The line is in the Detail section. The report includes a subreport. And
the report is based on a parameter query with a two table join.

Only one of the vertical lines needs to grow. None of the vertical lines in
the subreport need to grow but that would be nice in the future. And the
ultimate goal is to output to PDF, which I have working super.

Thanks.

David
Back to top
Marshall Barton
External


Since: Dec 07, 2003
Posts: 5120



PostPosted: Wed Mar 25, 2009 9:24 pm    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Proposal Doctor <Proposal Doctor DeleteThis @discussions.microsoft.com>
wrote:

>I have a report that is based on a government form that has several vertical
>lines. One of the lines in the report needs to be pegged to a horizontal
>line and to grow downward if information in one of the fields on either side
>of the line increases by more than four lines. The bottom of the line needs
>to stop at the intersection of another horizontal line. (I have been solving
>this by opening the report in design view and extending the line manually.
>That's getting old and other users won't know what to do.)
>
>I have tried the Me.Line technique on the MS website and either I am missing
>something or it doesn't work in Access 2007. Has anyone gotten Me.Line to
>work with Access 2007? Is it possible to peg the bottom of a growing line to
>a horizontal line?
>
>The line is in the Detail section. The report includes a subreport. And
>the report is based on a parameter query with a two table join.
>
>Only one of the vertical lines needs to grow. None of the vertical lines in
>the subreport need to grow but that would be nice in the future. And the
>ultimate goal is to output to PDF, which I have working super.


The Line method should work if the two horizontal lines are
in the same section and the code is in the section's Print
event procedure:

Me.Line (Xposition,Me.line1.Top) - (Xposition, Me.line2.Top)

You never said what the horizontal position of the vertical
line should be so you'll have to replace my generic place
holder.

--
Marsh
MVP [MS Access]
Back to top
Proposal Doctor
External


Since: Mar 25, 2009
Posts: 5



PostPosted: Wed Mar 25, 2009 9:24 pm    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If I understand you correctly, I should have something like:


Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.ScaleMode = 1
Me.ForeColor = 0
Me.Line (5.5 * 1440, 0)-(5.5 * 1440, 14400), vbGreen
Me.Line (2.3 * 1440, 0)-Step(20, 20000 * 1440), vbRed

'Marshall Barton via MS Community
'Me.Line (Xposition, Me.line1.Top)-(Xposition, Me.line2.Top)
Me.Line (0.3 * 1440, Me.line1.Top)-(5 * 1440, Me.line2.Top), vbGreen


End Sub

===
Is that correct?

David



"Marshall Barton" wrote:

> Proposal Doctor <Proposal Doctor DeleteThis @discussions.microsoft.com>
> wrote:
>
> >I have a report that is based on a government form that has several vertical
> >lines. One of the lines in the report needs to be pegged to a horizontal
> >line and to grow downward if information in one of the fields on either side
> >of the line increases by more than four lines. The bottom of the line needs
> >to stop at the intersection of another horizontal line. (I have been solving
> >this by opening the report in design view and extending the line manually.
> >That's getting old and other users won't know what to do.)
> >
> >I have tried the Me.Line technique on the MS website and either I am missing
> >something or it doesn't work in Access 2007. Has anyone gotten Me.Line to
> >work with Access 2007? Is it possible to peg the bottom of a growing line to
> >a horizontal line?
> >
> >The line is in the Detail section. The report includes a subreport. And
> >the report is based on a parameter query with a two table join.
> >
> >Only one of the vertical lines needs to grow. None of the vertical lines in
> >the subreport need to grow but that would be nice in the future. And the
> >ultimate goal is to output to PDF, which I have working super.
>
>
> The Line method should work if the two horizontal lines are
> in the same section and the code is in the section's Print
> event procedure:
>
> Me.Line (Xposition,Me.line1.Top) - (Xposition, Me.line2.Top)
>
> You never said what the horizontal position of the vertical
> line should be so you'll have to replace my generic place
> holder.
>
> --
> Marsh
> MVP [MS Access]
>
Back to top
Emelina Pollock
External


Since: Mar 25, 2009
Posts: 1



PostPosted: Wed Mar 25, 2009 9:44 pm    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Who are you???

Emelina Smile



On 3/25/09 9:18 PM, in article
7DE9C138-7F4D-42E9-8C4E-1025B246596C.RemoveThis@microsoft.com, "Proposal Doctor"
<Proposal Doctor.RemoveThis@discussions.microsoft.com> wrote:

> I have a report that is based on a government form that has several vertical
> lines. One of the lines in the report needs to be pegged to a horizontal
> line and to grow downward if information in one of the fields on either side
> of the line increases by more than four lines. The bottom of the line needs
> to stop at the intersection of another horizontal line. (I have been solving
> this by opening the report in design view and extending the line manually.
> That's getting old and other users won't know what to do.)
>
> I have tried the Me.Line technique on the MS website and either I am missing
> something or it doesn't work in Access 2007. Has anyone gotten Me.Line to
> work with Access 2007? Is it possible to peg the bottom of a growing line to
> a horizontal line?
>
> The line is in the Detail section. The report includes a subreport. And
> the report is based on a parameter query with a two table join.
>
> Only one of the vertical lines needs to grow. None of the vertical lines in
> the subreport need to grow but that would be nice in the future. And the
> ultimate goal is to output to PDF, which I have working super.
>
> Thanks.
>
> David
Back to top
Marshall Barton
External


Since: Dec 07, 2003
Posts: 5120



PostPosted: Thu Mar 26, 2009 8:03 am    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Proposal Doctor wrote:

>If I understand you correctly, I should have something like:
>
>
>Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
>
> Me.ScaleMode = 1
> Me.ForeColor = 0
> Me.Line (5.5 * 1440, 0)-(5.5 * 1440, 14400), vbGreen
> Me.Line (2.3 * 1440, 0)-Step(20, 20000 * 1440), vbRed
>
> Me.Line (0.3 * 1440, Me.line1.Top)-(5 * 1440, Me.line2.Top), vbGreen
>

Well, I can't tell what you should have unless you explain
what you need more precisely. But, those three statements
seem rather odd to me. The first one draws a vertical line
5.5 inches from the left margin, starting at the very top of
the detail section and ending 10 inches down the detail
section. Since it is very unlikely that a single record's
detail section is anywhere near 10 inches high, it will be
cropped at the bottom of the detail section.

The red line is not even vertical (it slants by 20 twips)
and you specified its height at 20,000 inches, which is
ridiculous.

The third one starts 3/10 of an inch from the left margin
and at the vertical position of line1 (if that's the real
name of some horizontal(?) line). It then goes diagonally
down and to the right 4.7 inches until it reaches the top of
another horizontal(?) line named line2.

Does my description match anything like what actually
happened?

--
Marsh
MVP [MS Access]
Back to top
Proposal Doctor
External


Since: Mar 25, 2009
Posts: 5



PostPosted: Thu Mar 26, 2009 9:39 am    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Marshall.

I have not been able to get any of these lines to appear in a report created
by Access 2007. That was one of my original questions - does Me.Line work in
A12? Again, my printer is PDF.

After posting my question, I tried to understand how this works by reading
The Developers Handbook (Getz et. al) and Access 2007 VBA (HF). Your reply
was more informative and so thanks a million.

Is there a detailed explanation of Me.Line somewhere? I have scrolled
through page after page in Help.

Once again, does Me.Line work in A12 for you?

Thanks. I really appreciate your time.

David

"Marshall Barton" wrote:

> Proposal Doctor wrote:
>
> >If I understand you correctly, I should have something like:
> >
> >
> >Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
> >
> > Me.ScaleMode = 1
> > Me.ForeColor = 0
> > Me.Line (5.5 * 1440, 0)-(5.5 * 1440, 14400), vbGreen
> > Me.Line (2.3 * 1440, 0)-Step(20, 20000 * 1440), vbRed
> >
> > Me.Line (0.3 * 1440, Me.line1.Top)-(5 * 1440, Me.line2.Top), vbGreen
> >
>
> Well, I can't tell what you should have unless you explain
> what you need more precisely. But, those three statements
> seem rather odd to me. The first one draws a vertical line
> 5.5 inches from the left margin, starting at the very top of
> the detail section and ending 10 inches down the detail
> section. Since it is very unlikely that a single record's
> detail section is anywhere near 10 inches high, it will be
> cropped at the bottom of the detail section.
>
> The red line is not even vertical (it slants by 20 twips)
> and you specified its height at 20,000 inches, which is
> ridiculous.
>
> The third one starts 3/10 of an inch from the left margin
> and at the vertical position of line1 (if that's the real
> name of some horizontal(?) line). It then goes diagonally
> down and to the right 4.7 inches until it reaches the top of
> another horizontal(?) line named line2.
>
> Does my description match anything like what actually
> happened?
>
> --
> Marsh
> MVP [MS Access]
>
Back to top
Proposal Doctor
External


Since: Mar 25, 2009
Posts: 5



PostPosted: Thu Mar 26, 2009 10:33 am    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Also thanks for pointing out that out-of-range 20,000 inch value. Even using
huge 5-foot wide plotters, I couldn't extend a line that far. And the 22
inch maximum length for an Access control/object would be exceeded.

David

"Marshall Barton" wrote:

> Proposal Doctor wrote:
>
> >If I understand you correctly, I should have something like:
> >
> >
> >Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
> >
> > Me.ScaleMode = 1
> > Me.ForeColor = 0
> > Me.Line (5.5 * 1440, 0)-(5.5 * 1440, 14400), vbGreen
> > Me.Line (2.3 * 1440, 0)-Step(20, 20000 * 1440), vbRed
> >
> > Me.Line (0.3 * 1440, Me.line1.Top)-(5 * 1440, Me.line2.Top), vbGreen
> >
>
> Well, I can't tell what you should have unless you explain
> what you need more precisely. But, those three statements
> seem rather odd to me. The first one draws a vertical line
> 5.5 inches from the left margin, starting at the very top of
> the detail section and ending 10 inches down the detail
> section. Since it is very unlikely that a single record's
> detail section is anywhere near 10 inches high, it will be
> cropped at the bottom of the detail section.
>
> The red line is not even vertical (it slants by 20 twips)
> and you specified its height at 20,000 inches, which is
> ridiculous.
>
> The third one starts 3/10 of an inch from the left margin
> and at the vertical position of line1 (if that's the real
> name of some horizontal(?) line). It then goes diagonally
> down and to the right 4.7 inches until it reaches the top of
> another horizontal(?) line named line2.
>
> Does my description match anything like what actually
> happened?
>
> --
> Marsh
> MVP [MS Access]
>
Back to top
Marshall Barton
External


Since: Dec 07, 2003
Posts: 5120



PostPosted: Thu Mar 26, 2009 12:27 pm    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

AFAIK, line works in A2007 but it will be some time before I
can get to my A2007 machine and try it. In the meantime, I
suggest that you eliminate a variable from the problem and
set the report to an ordinary printer and just preview the
report to see if it does something.

I seem to remember that the VBA Help topic for the Line
method is an accurate explanation of how it works. The Help
topic in A2000 through A2003 was all messed up, as if it had
been copy/pasted from some other programming language.
--
Marsh
MVP [MS Access]


Proposal Doctor wrote:
>I have not been able to get any of these lines to appear in a report created
>by Access 2007. That was one of my original questions - does Me.Line work in
>A12? Again, my printer is PDF.
>
>After posting my question, I tried to understand how this works by reading
>The Developers Handbook (Getz et. al) and Access 2007 VBA (HF). Your reply
>was more informative and so thanks a million.
>
>Is there a detailed explanation of Me.Line somewhere? I have scrolled
>through page after page in Help.
>
>Once again, does Me.Line work in A12 for you?
>
>Thanks. I really appreciate your time.
>
>David
>
>"Marshall Barton" wrote:
>
>> Proposal Doctor wrote:
>>
>> >If I understand you correctly, I should have something like:
>> >
>> >
>> >Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
>> >
>> > Me.ScaleMode = 1
>> > Me.ForeColor = 0
>> > Me.Line (5.5 * 1440, 0)-(5.5 * 1440, 14400), vbGreen
>> > Me.Line (2.3 * 1440, 0)-Step(20, 20000 * 1440), vbRed
>> >
>> > Me.Line (0.3 * 1440, Me.line1.Top)-(5 * 1440, Me.line2.Top), vbGreen
>> >
>>
>> Well, I can't tell what you should have unless you explain
>> what you need more precisely. But, those three statements
>> seem rather odd to me. The first one draws a vertical line
>> 5.5 inches from the left margin, starting at the very top of
>> the detail section and ending 10 inches down the detail
>> section. Since it is very unlikely that a single record's
>> detail section is anywhere near 10 inches high, it will be
>> cropped at the bottom of the detail section.
>>
>> The red line is not even vertical (it slants by 20 twips)
>> and you specified its height at 20,000 inches, which is
>> ridiculous.
>>
>> The third one starts 3/10 of an inch from the left margin
>> and at the vertical position of line1 (if that's the real
>> name of some horizontal(?) line). It then goes diagonally
>> down and to the right 4.7 inches until it reaches the top of
>> another horizontal(?) line named line2.
>>
>> Does my description match anything like what actually
>> happened?
Back to top
Marshall Barton
External


Since: Dec 07, 2003
Posts: 5120



PostPosted: Sat Mar 28, 2009 9:15 am    Post subject: Re: Grow Vertical Line [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Proposal Doctor wrote:
>I have not been able to get any of these lines to appear in a report created
>by Access 2007. That was one of my original questions - does Me.Line work in
>A12? Again, my printer is PDF.
>

OK, I finally fired up my A2007 machine and set up a sample
db table and report. I tried a couple of simple tests to
draw lines within the detail section and everything worked
as expected.

Did you get a chance to preview your report using an
ordinary printer?

--
Marsh
MVP [MS Access]
Back to top
TK Neva
External


Since: Oct 05, 2009
Posts: 1



PostPosted: Mon Oct 05, 2009 1:16 pm    Post subject: Vertical report lines not showing Access [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have a very similar issue. I am making a report that has a header and footer for the page and a details section that has anywhere from 1 line item to 30 mine-items. On this report, whether the line items equal 1 or 30, the print out is the same size (because the footer defaults to the bottom, leaving space in between the footer and details) with vertical lines running down each side of the details section.

I have tried these techniques but they will not work because the reports that have only 1 line item truncates the line I draw with the code. If I fill the entire details section with a large number of line items, the report looks fine, but if it only has 1, then I get a vertical line on either side just tall enough for the 1 record (about .22 inches high).

Does anyone have an idea about how to make this look right? I appreciate the help.



Proposal Docto wrote:

Grow Vertical Line
25-Mar-09

I have a report that is based on a government form that has several vertical
lines. One of the lines in the report needs to be pegged to a horizontal
line and to grow downward if information in one of the fields on either side
of the line increases by more than four lines. The bottom of the line needs
to stop at the intersection of another horizontal line. (I have been solving
this by opening the report in design view and extending the line manually.
That's getting old and other users won't know what to do.)

I have tried the Me.Line technique on the MS website and either I am missing
something or it doesn't work in Access 2007. Has anyone gotten Me.Line to
work with Access 2007? Is it possible to peg the bottom of a growing line to
a horizontal line?

The line is in the Detail section. The report includes a subreport. And
the report is based on a parameter query with a two table join.

Only one of the vertical lines needs to grow. None of the vertical lines in
the subreport need to grow but that would be nice in the future. And the
ultimate goal is to output to PDF, which I have working super.

Thanks.

David

EggHeadCafe - Software Developer Portal of Choice
PABZlib In-Memory ASP/ XML Compression Component
http://www.eggheadcafe.com/tutorials/aspnet/af07211b-a0c2-45df-ab26-1b...92fb6ac
Back to top
Duane Hookom
External


Since: Feb 07, 2005
Posts: 1359



PostPosted: Mon Oct 05, 2009 3:16 pm    Post subject: RE: Vertical report lines not showing Access [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm not sure what the actual question is since I am using the web interface.
If you expect a line to extend vertically beyond detail sections, you should
draw the line in the On Page event of the report.

--
Duane Hookom
Microsoft Access MVP


"TK Neva" wrote:

> I have a very similar issue. I am making a report that has a header and footer for the page and a details section that has anywhere from 1 line item to 30 mine-items. On this report, whether the line items equal 1 or 30, the print out is the same size (because the footer defaults to the bottom, leaving space in between the footer and details) with vertical lines running down each side of the details section.
>
> I have tried these techniques but they will not work because the reports that have only 1 line item truncates the line I draw with the code. If I fill the entire details section with a large number of line items, the report looks fine, but if it only has 1, then I get a vertical line on either side just tall enough for the 1 record (about .22 inches high).
>
> Does anyone have an idea about how to make this look right? I appreciate the help.
>
>
>
> Proposal Docto wrote:
>
> Grow Vertical Line
> 25-Mar-09
>
> I have a report that is based on a government form that has several vertical
> lines. One of the lines in the report needs to be pegged to a horizontal
> line and to grow downward if information in one of the fields on either side
> of the line increases by more than four lines. The bottom of the line needs
> to stop at the intersection of another horizontal line. (I have been solving
> this by opening the report in design view and extending the line manually.
> That's getting old and other users won't know what to do.)
>
> I have tried the Me.Line technique on the MS website and either I am missing
> something or it doesn't work in Access 2007. Has anyone gotten Me.Line to
> work with Access 2007? Is it possible to peg the bottom of a growing line to
> a horizontal line?
>
> The line is in the Detail section. The report includes a subreport. And
> the report is based on a parameter query with a two table join.
>
> Only one of the vertical lines needs to grow. None of the vertical lines in
> the subreport need to grow but that would be nice in the future. And the
> ultimate goal is to output to PDF, which I have working super.
>
> Thanks.
>
> David
>
> EggHeadCafe - Software Developer Portal of Choice
> PABZlib In-Memory ASP/ XML Compression Component
> http://www.eggheadcafe.com/tutorials/aspnet/af07211b-a0c2-45df-ab26-1b...92fb6ac
>
Back to top
Joe
External


Since: Nov 14, 2009
Posts: 1



PostPosted: Sat Nov 14, 2009 2:45 pm    Post subject: Re: Vertical report lines not showing Access [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David,

Try this:
http://www.lebans.com/PrintLines.htm

HTH


<TK Neva> wrote in message news:2009105161641radtad@charter.net...
>I have a very similar issue. I am making a report that has a header and
>footer for the page and a details section that has anywhere from 1 line
>item to 30 mine-items. On this report, whether the line items equal 1 or
>30, the print out is the same size (because the footer defaults to the
>bottom, leaving space in between the footer and details) with vertical
>lines running down each side of the details section.
>
> I have tried these techniques but they will not work because the reports
> that have only 1 line item truncates the line I draw with the code. If I
> fill the entire details section with a large number of line items, the
> report looks fine, but if it only has 1, then I get a vertical line on
> either side just tall enough for the 1 record (about .22 inches high).
>
> Does anyone have an idea about how to make this look right? I appreciate
> the help.
>
>
>
> Proposal Docto wrote:
>
> Grow Vertical Line
> 25-Mar-09
>
> I have a report that is based on a government form that has several
> vertical
> lines. One of the lines in the report needs to be pegged to a horizontal
> line and to grow downward if information in one of the fields on either
> side
> of the line increases by more than four lines. The bottom of the line
> needs
> to stop at the intersection of another horizontal line. (I have been
> solving
> this by opening the report in design view and extending the line manually.
> That's getting old and other users won't know what to do.)
>
> I have tried the Me.Line technique on the MS website and either I am
> missing
> something or it doesn't work in Access 2007. Has anyone gotten Me.Line
> to
> work with Access 2007? Is it possible to peg the bottom of a growing line
> to
> a horizontal line?
>
> The line is in the Detail section. The report includes a subreport. And
> the report is based on a parameter query with a two table join.
>
> Only one of the vertical lines needs to grow. None of the vertical lines
> in
> the subreport need to grow but that would be nice in the future. And the
> ultimate goal is to output to PDF, which I have working super.
>
> Thanks.
>
> David
>
> EggHeadCafe - Software Developer Portal of Choice
> PABZlib In-Memory ASP/ XML Compression Component
> http://www.eggheadcafe.com/tutorials/aspnet/af07211b-a0c2-45df-ab26-1b...92fb6ac
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Reports All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum