[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Cannot Draw Business Graphics
Using SQR V3.0.18......
Trying to learn how to utilize the DECLARE-CHART and
PRINT-CHART functionality of SQR. Built small program to
build a line chart. Program executes but when trying to view
the file using SQRV (viewer looking at the SPF file) I get the
SQR Viewer Waring: SQR 6626 Cannot Draw Business
Graphics.
Any ideas?? I have attached the program for anyone who is
really curious.
!******************************************************************************
! chartex.sqr Printing a chart example
!
! NOTE: Best viewed with UltraEdit with
hardtab of 4 spaces.
!
! PROGRAMMERS
! Copmuter Management Sciences, Inc 248 262-1495
! (DCA) David Anderson
!
!******************************************************************************
! PROGRAM HISTORY
! Date Init What Occurred/Modified
! MON-YYYY DCA Created Program
!
!******************************************************************************
#include 'setenv.sqc' !Determines environment SQR executes in
#include 'setup01.sqc'
!******************************************************************************
begin-setup
!******************************************************************************
declare-chart First
chart-size = (30,20)
title = 'First Chart Example'
type = line
end-declare
end-setup
!******************************************************************************
begin-heading 4
!******************************************************************************
#include 'stdhdg01.sqc' !Standard heading
end-heading
!******************************************************************************
begin-procedure Initialize-Program
#debug show 'Initialize Program'
!******************************************************************************
do Init-DateTime
do Init-Number
do Get-Current-DateTime
move 'Report Title Goes Here' to $ReportTitle
move 'Program Name Goes Here' to $ReportID
show 'Beginning ' $ReportID ', ' $ReportTitle ' at ' $AsOfNow
show ' '
create-array name=Chart_Data size=10
field=X_Position:number
field=Y_Position:number
end-procedure
!******************************************************************************
BEGIN-PROGRAM
#debug show 'Begin Program'
!******************************************************************************
do Initialize-Program
do Populate-Chart-Data
print-chart First (6,1)
data-array = Chart_Data
data-array-row-count = 10
data-array-column-count = 2
END-PROGRAM
!******************************************************************************
begin-procedure Populate-Chart-Data
#debug show 'Populate-Chart-Data'
!******************************************************************************
put 1 11 into Chart_Data(0)
put 2 10 into Chart_Data(1)
put 3 9 into Chart_Data(2)
put 4 8 into Chart_Data(3)
put 5 7 into Chart_Data(4)
put 6 6 into Chart_Data(5)
put 7 5 into Chart_Data(6)
put 8 4 into Chart_Data(7)
put 9 3 into Chart_Data(8)
put 10 2 into Chart_Data(9)
end-procedure
!******************************************************************************
! INCLUDE FILES
!******************************************************************************
#include 'curdttim.sqc' !Procedures to retrieve current system date/time
#include 'datemath.sqc' !SQR date arithmetic procedures
#include 'datetime.sqc' !Routines for date/time formatting
#include 'number.sqc' !Routines for number formatting
#include 'readxlat.sqc' !Read the Translate Table for the desired values
!Required Process Scheduler SQCs
#include 'stdapi.sqc' !Process Scheduler Interface
!#include 'askaod.sqc' !Get-As-Of-Date
!#include 'payrnctl.sqc' !Select-Parameters PAYROLL
!#include 'hrrnctl1.sqc' !Select-Parameters HR