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!

GRAPH IN REPORT 1

Status
Not open for further replies.

Mistral2

Technical User
Nov 12, 2002
21
TN
hi everybody,

In a report I want to show a graph in every line like this:

Qty 1999 Qty 2000 Qty 2001 QTY 2002 GRAPH

15 12 13 21 ?????
17 41 12 25 ?????
etc...

Anyone can help me ?
Mistral
 
Mistral,
While not real elegant, you could create a text field on the report and then use an expression like:
REPLICATE("*", scaledvalue)

Where 'scaledvalue' is based on the number you want "graphed" and the number of characters you've allowed for the field to display.

Rick
 
Mistral2

You may consider Automating Excel to create the desired graph (which is more suited for graphs), and pasting your graph in your report. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
What you can do is create a temporary file with just 1 General field and embed a MSGraph in that field. The graph itself will have its own values so you need change them with your own data (use the help file for an example on changing graph values). After that, create a report and an OLEControl containing the general field which in turn contains the graph.

Let me know if this helped.

torturedmind [trooper]
 
Mike,
Please can you give me more details to do this.

Merci
Mistral
 
Mistral2

Here as small example of how to make a chart in Excel with Visual Foxpro:
Code:
loExcel = CREATEOBJECT("Excel.application")
loExcel.Workbooks.add()
loActive = loExcel.ActiveSheet
loActive.Range("A1").Formula="1"
loActive.Range("A2").Formula="2"
loActive.Range("A3").Formula="3"
loActive.Range("A4").Formula="4"
loActive.Range("A5").Formula="5"
loActive.Range("B1").Formula="20"
loActive.Range("B2").Formula="30"
loActive.Range("B3").Formula="40"
loActive.Range("B4").Formula="50"
loActive.Range("B5").Formula="60"
objChart1 = loActive.ChartObjects.Add(100, 100, 200, 200)
loActive.chartobjects(1).chart.;
	chartwizard(loActive.range(loActive.cells(1,1),loActive.cells(5,2)),;
	-4100,4,1,0,1,1,"","","","")
loExcel.visible = .t.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike Lewis,

I downloaded your SimpleChart and it ran like a champ. Thanks much. But like Dave said, how can we print the resulting chart?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top