[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR to print Pie charts
Robert,
You need to declare the chart and create the associated data array.
i.e.
Declare-Chart chart_name
Title=chart_title [Sub-Title=next_line]
Type=PIE
Legend=Yes
Legend-Placement=Upper-Right
X-Axis-Label= x_label
Y-Axis-Label= y_label
End-Declare
Create-Array Name= array_name size= array_size
Field=field_name:field_type [:occurs] [= initial_value]
For additional info check SQR for Peoplesoft by Ray Ontko or check the
reference guides at http://www.ontko.com/
Dave
----- Original Message -----
From: "Huss, Robert" <Robert_Huss@BAUSCH.COM>
To: <SQR-USERS@list.iex.net>
Sent: Tuesday, January 08, 2002 9:39 AM
Subject: SQR to print Pie charts
> All-
>
> Has anyone ever written, modified or know of any sqr's
> that create a chart of some kind. Specifically I am
> looking to create a pie chart from within an sqr. I
> have found an example program that is below,
> but I can not seem to get the sqr to output a chart.
> When printed the outout is meaningless characters
> (i.e. sending Postscript to a non Postscript printer).
> I have tried printing the sqr to the printer which I
> thought was a Postscript printer, but this did not
> work either. I tried changing the printer type to HP (commented out line)
> Any help would be appreciated. Thanks.
>
> SQR/4.3.2/PC/Windows NT 4.0/Oracle 7.3.4/Sep 14 1998
> Win 95
> Oracle
> PeopleSoft 7.53
>
> Code
> ---------
> ! SQRPie Demonstrate SQR v3.0 pie graph commands
> ! To print this report to an HP, use the following:
> ! sqr sqrpie / -printer:hp
> !
> Begin-Setup
> Declare-Layout SQRPie
> Orientation=Portrait
> Left-Margin=.95 Top-Margin=.75
> Max-Lines=62 Max-Columns=80
> End-Declare
> Declare-Report SQRPie
> Layout=SQRPie
> !Printer-Type=Postscript
> Printer-Type=HP
> End-Declare
> Create-Array Name=emp_sales Size=4
> Field=emp:char Field=jun_sales:number:3
> End-Setup
>
> Begin-Program
> Graphic (1,1,66) Box 58 20 ! Draw box around whole page.
> Alter-Printer Font=5 Point-Size=30
> Print 'SQR Goes Graphic!!' (3,17)
> Print 'SQR Goes Graphic!!' (57,17)
> Put 'Claire' 50
> into emp_sales(0) emp jun_sales(0)
> Put 'Evan' 25
> into emp_sales(1) emp jun_sales(0)
> Put 'Jacob' 38
> into emp_sales(2) emp jun_sales(0)
> Put 'Madeline' 45
> into emp_sales(3) emp jun_sales(0)
>
> Print-Chart (5, 3)
> Chart-Size = (40, 12)
> Type = pie
> Legend = no
> Title = 'MidWest Sales for June'
> Sub-Title = '(Sales by Employee)'
> Data-Array-Row-Count = 4
> Data-Array-Column-Count = 2
> Data-Array = emp_sales
>
> Alter-Printer Font=5 Point-Size=12
> Print 'Pie Graph Features in SQR' (10,45)
> Print '- 3D ' (+1,47)
> Print '- Exploded Segments' (+1,47)
> Print 'Here is the SQR program that produced this page:' (18, 17)
> ! Draw shaded box with vertical line to create two columns
> Graphic (20,2,64) Box 35 10 4 ! Box with 4 percent shading
> Graphic (19,33,35) Vert-Line 4
> Alter-Printer Font=5 Point-Size=7
> Open 'sqrpie.sqr' As 1 For-Reading Record=200
> Let #Line = 20
> Columns 3 34
> While 1
> Read 1 Into $Rec:200
> If #End-File
> Break
> End-If
> Print $Rec (#Line,1)
> Add 1 To #Line
> If #Line > 54
> Next-column
> Let #Line = 20
> End-If
> End-While
> Close 1
> End-Program
> -------------------
>
> Robert Huss
> robert_huss@bausch.com
>
>
> EMAIL DISCLAIMER
>
> Please Note: The information contained in this message may be privileged
and
> confidential, protected from disclosure, and/or intended only for the use
of
> the individual or entity named above. If the reader of this message is not
> the intended recipient, or an employee or agent responsible for delivering
> this message to the intended recipient, you are hereby notified that any
> disclosure, distribution, copying or other dissemination of this
> communication is strictly prohibited. If you received this communication
in
> error, please immediately reply to the sender, delete the message and
> destroy all copies of it.
>
> Thank You