Draw lines, pset points, draw circles on a report

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

Guest

I can set a scale and draw lines and points on a report by building "on
format" code. But how do I the the "on format" event to read the data from a
table or query? It is easy to copy the points and paste them into the code,
like this...

x = 3.285: y = 4.092: Me.PSet (x, y), lngColor
x = 3.279: y = 4.457: Me.PSet (x, y), lngColor
x = 3.569: y = 4.458: Me.PSet (x, y), lngColor

but I have thousands of points to compute and "pset"

How do I get the event "on format" to read my points?
 
Thanks Duane, but this won't work.
See the data to be plotted will be a topographic survey of points and lines.
The user will supply the surveys, and choose which (x,y) points make up
the lines. Some reports will be plan views, and some reports cross sections.

It is important that these be accurately scaled (nn feet per inch).
I can do a xy scatter plot of the points, but the scale can't be contolled.
And it does not have the linear features.

Using the MS access help, it showed how to draw a circle, to scale, pset
points, and draw lines at specific coordinates but it only worked on reports
and then only in the "On Page" or "On format" events. The coordinates were
all hard-coded into
the code of the report.

I have an example that works but I had to figure all the scaled points and
lines in a query, then paste them to the report code. If I rescale or zoom
the plot, all the coordinates must be re-computed.

If I could just pass the points and lines to the "on format" event, they
could be processed from the survey table.

Would it help to see the single report and the code in it?

hgeron
 
Did you look at the reports in the Corp Tech Demo? It seemed to me that if
you have your values in data, you can "plot" them anywhere you want them on
the page. You have accuracy down to 1/1440 of an inch.

If you don't want to bind the data to your report as the record source, you
can use code to open recordsets and plot you points and draw your circles.
 
Yes, I did experiment with the report I downloaded from Corp Tech, but it
does not come close to what I need. There is no text, or bitmap to print,
and the data is not printed... the data dicatates where a point is placed or
a line drawn.

I did try to open the I needed to read the survey, but I got a message that
I could not do that with the "On format" event. Maybe I had the wrong method
or syntax.
If I knew how to open the recordset to make the data visible to "On Format"
or "On Page", that should work.

I don't know what you mean about "binding" the data. But the data will
always changing as new surveys are loaded.

Hgeron
 
I assume the values you are wishing to plot are in a table or tables and can
be displayed in a query. Is this correct?

I assume you want to plot the these values in a report. Is this correct?

If both of the above are true, you can either read the values for plotting
by setting the record source of report to the query or opening a recordset
in code on the report.

If you don't want to set the report's record source, leave it blank and add
code to the On Page event of the report.

Dim db As DAO.Database
Dim rs as DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("qselYourQuery")
With rs
.MoveFirst
Do Until .eof
'code to plot your point
.MoveNext
Loop
.Close
End With
Set rs = Nothing
Set db = Nothing
 
I have microsoft Access table containing at the coordinates of the beginning and end of a line in each record
How can draw these lines in a single report page?????????
any help in this
 
Last edited:
Back
Top