Grow/Shrink Vertical Line

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two sorting/grouping sections in a report that can shrink/grow. The report has two columns that I'd like to separate with a vertical line. When I run the report, the sections shrink/grow, but the line is only as long as the line in the section. Can anyone give me some help? Thanks..

Don Rountree
 
HI:

Your best bet is to design the section that shrinks and grows so that there
is a vertical line the same height as the fields (deviding the two halves)
and each line will draw a segment the same length. You might have to tweek
the length of the vertical line so the segments join flush. I don't know of
any property allowing the line to shrink or grow.
______________________________________________
detail section
______________________________________________

[name] [Address] | [phone] [Utilities]

verticale line------^

______________________________________________

Hope it helps

Don Rountree said:
I have two sorting/grouping sections in a report that can shrink/grow.
The report has two columns that I'd like to separate with a vertical line.
When I run the report, the sections shrink/grow, but the line is only as
long as the line in the section. Can anyone give me some help? Thanks...
 
You may need to use the Line method of the report to draw the line. There is
sample code at www.lebans.com. Look for PrintLines.

--
Duane Hookom
MS Access MVP


Don Rountree said:
I have two sorting/grouping sections in a report that can shrink/grow.
The report has two columns that I'd like to separate with a vertical line.
When I run the report, the sections shrink/grow, but the line is only as
long as the line in the section. Can anyone give me some help? Thanks...
 
Actually Duane, I was going to post that while I had sample code to
handle most situations, there is nothing currently available to
programmatically support Columns, and that perhaps you had done some
work in this area.
If not perhaps we could figure it out faster together.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
After re-reading the post, I wonder if the report is a two column report and
Rod wants a single vertical line between the two columns. If this is the
case, add a line at the right side of the first column. Name it "CenterLine"
and make it invisible. Then add code to the On Page event:

Private Sub Report_Page()
Me.Line (Me.CenterLine.Left, 0)-Step(0, 10 * 1440)
End Sub
 
This is exactly what I have been looking for, but I am not an advanced user. Could you please explain how to use the code. What is me.line?


----- Duane Hookom wrote: -----

After re-reading the post, I wonder if the report is a two column report and
Rod wants a single vertical line between the two columns. If this is the
case, add a line at the right side of the first column. Name it "CenterLine"
and make it invisible. Then add code to the On Page event:

Private Sub Report_Page()
Me.Line (Me.CenterLine.Left, 0)-Step(0, 10 * 1440)
End Sub
 
You open your report in design view and view the report Properties. Select
the Event Properties and click the On Page event. Click the [...] on the
right of the property and select to add Code. The top and bottom lines will
appear in the module window. Just add the line of code in the middle.

You can look up Line method in Help. Depending on your version of Access the
Help may be horrible for the Line method.

--
Duane Hookom
MS Access MVP


jim said:
This is exactly what I have been looking for, but I am not an advanced
user. Could you please explain how to use the code. What is me.line?
 
Thank you, That was a great help.
I added this code on my subreport, but it does not show on my main report. I also added to the main report, but it does not restrict itself to the items that are growing or shrinking, but runs the length of the page. This would be just fine if the subreports' event procedure worked when viewed on the main report.

Thanks so much for your help
 
I wasn't aware this was for a subreport. Subreports don't have Page events.
You might want to try the code in the On Open event of the subreport. You
haven't provided enough ingo to make other suggestions.

--
Duane Hookom
MS Access MVP


Jim said:
Thank you, That was a great help.
I added this code on my subreport, but it does not show on my main report.
I also added to the main report, but it does not restrict itself to the
items that are growing or shrinking, but runs the length of the page. This
would be just fine if the subreports' event procedure worked when viewed on
the main report.
 
So sorry if I was unclear. I have a tabular report that is a printed question form. Several of the columns as well as the section are set to can grow, and this works perfectly. However, when I preview or print the report, the lines that separate each part of an unique question do not grow as the question does. I thought your me line suggestion would work if i created a subreport with the me line, then put that inside a report to restrict the me line to the subreport. This is the only reason I tried a subreport. All I really need is the vertical lines that separate each part of the question to grow (or appear to) when any section of the question forces a can grow.

Thank you so much for your help.





----- Duane Hookom wrote: -----

I wasn't aware this was for a subreport. Subreports don't have Page events.
You might want to try the code in the On Open event of the subreport. You
haven't provided enough ingo to make other suggestions.

--
Duane Hookom
MS Access MVP


Jim said:
Thank you, That was a great help.
I added this code on my subreport, but it does not show on my main report.
I also added to the main report, but it does not restrict itself to the
items that are growing or shrinking, but runs the length of the page. This
would be just fine if the subreports' event procedure worked when viewed on
the main report.
 
You might want to check the Calendar reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4. The line method is used
to draw a line of the property height to match "can grow" controls.

--
Duane Hookom
MS Access MVP


jim said:
So sorry if I was unclear. I have a tabular report that is a printed
question form. Several of the columns as well as the section are set to can
grow, and this works perfectly. However, when I preview or print the
report, the lines that separate each part of an unique question do not grow
as the question does. I thought your me line suggestion would work if i
created a subreport with the me line, then put that inside a report to
restrict the me line to the subreport. This is the only reason I tried a
subreport. All I really need is the vertical lines that separate each part
of the question to grow (or appear to) when any section of the question
forces a can grow.
 
Back
Top