Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Draw Lines on Report

Status
Not open for further replies.

jimb0ne

Programmer
Oct 6, 2003
291
CA
Hi, I'm having a problem drawing some lines on my report. I'm trying to draw a graph from code(I know, I know) but at any rate, the problem is that the graph is on the 3rd page of my report. My report has all the controls in the detail section, and I'm trying to plot points according where I have a box already laid out. The problem is that values returned for the top of the box is for the overall report, but when you are drawing lines, the point 0,0 is always in the top left corner of whatever page you're on. Is there some way I could set it up so that the controls top value was relate to the page? or some way that I can determine what the amount that needs to be subtracted is?

Thanks in advance,
James
 
How are ya jimb0ne . . . . .

Have a look at the [blue]CreateReportControl Method.[/blue]

Note: the unit of measure for [blue]Left, Top, Width, Height[/blue] is a unit called [purple]twips[/purple].

[blue]One twip = 1/1440 inches.
Twips = 1440 * inches[/blue]

Calvin.gif
See Ya! . . . . . .
 
thanks aceman, the problem isn't with creating lines, its with their relation to the report. So for example, if I had a control on my report, say a textbox, that appeared on the 3rd page of my report, the top property would have a value of something like 20000(I have my scale mode set to pixels). Now if I wanted to draw a line from the bottom of the box to some random point the code would be something like

me.line (300, textbox.top + textbox.height)-(somepoint, somepoint)

or so you would think. The thing is that even though the textbox top property will be 20000, when using the line method it always sets the point (0,0) to the top right corner of the page you're on. So I want to know how to figure out what the point is relative to the page I'm on.
 
jimb0ne . . . . . Sorry to get back so late.
jimb0ne said:
[blue] . . . when using the line method [purple]it always sets the point (0,0) to the top right[/purple] . . .[/blue]
Have a look at the [blue]CurrentX & CurrentY[/blue] properties. You may have to set these to your starting point . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top