added sysprog entities
This commit is contained in:
44
SYSPROG/STPROC/OIPI_PIECHART_EXAMPLE.txt
Normal file
44
SYSPROG/STPROC/OIPI_PIECHART_EXAMPLE.txt
Normal file
@ -0,0 +1,44 @@
|
||||
Subroutine OIPI_Piechart_Example(void)
|
||||
|
||||
Declare Function Set_Printer
|
||||
|
||||
$Insert COLORS
|
||||
$insert OIPI_EQUATES
|
||||
$Insert OIPI_PIECHART_EQUATES
|
||||
|
||||
* Start the OIPI report with the INIT message
|
||||
|
||||
FileName = "OIPI_PIE_Example1"
|
||||
|
||||
PrintTitle = "OIPI Printing..."
|
||||
PreviewTitle = "OIPI Pie Chart Preview"
|
||||
|
||||
Margins = .5:@FM:.5:@FM:.5:@FM:.5 ;* half inch margins On the sides, one inch margins On the top
|
||||
Orientation = Portrait$
|
||||
PrintSetup = ""
|
||||
PrintSetup<Print_Style$, 1> = Preview_normal$
|
||||
PrintSetup<Print_Style$, 2> = Display_AllButtons$
|
||||
PrintSetup<2> = -1 ;* Set initial zoom to PageWidth
|
||||
PrintSetup<3> = 5 ;* Set the Print Preview position at 5% from top and left
|
||||
PrintSetup<4> = 5
|
||||
PrintSetup<5> = 95
|
||||
PrintSetup<6> = 95
|
||||
|
||||
VAL = Set_Printer("INIT", FileName, PrintTitle:@FM:PreviewTitle, Margins, Orientation, PrintSetup)
|
||||
if VAL < 0 then
|
||||
* Always check the return value of the INIT message for error
|
||||
ErrorMsg = "Fatal error with the INIT message:":VAL
|
||||
Return ''
|
||||
end
|
||||
|
||||
colors = ""
|
||||
colors = Red$ :@fm: Blue$ : @fm : ORANGE$ : @fm: MAGENTA$
|
||||
|
||||
wedges = ""
|
||||
wedges = 27:@fm:13:@fm:18:@fm:30
|
||||
rslt = oipi_piechart_helper(2,2,1,wedges, colors, LEGEND_DEFAULTS$)
|
||||
|
||||
X = Set_Printer('TERM')
|
||||
|
||||
Return ''
|
||||
|
Reference in New Issue
Block a user