Monday, March 31, 2008

How to include graphics in the sqr report?

Using Graphics command we can include BOX, Vertical Lines or Horizontal Lines:
GRAPHIC ( { line_int_lit | _var }, { column_int_lit | _var }, { width_int_lit | _var } )
BOX { depth_int_lit | _var } [ rule_width_int_lit | _var [ shading_int_lit | _var ] ]
GRAPHIC ( { line_int_lit | _var }, { column_int_lit | _var }, { length_int_lit | _var } )
HORZ-LINE [ rule_width_int_lit | _var ]
GRAPHIC ( { line_int_lit | _var }, { column_int_lit | _var }, { length_int_lit | _var } )
VERT-LINE [ rule_width_int_lit | _var ]

Example: GRAPHICS (3, 5, 9) BOX (5, 0, 5)
Here in this exp Graphics (3, 5, 9), 3 and 5 are the coordinates of starting point and 9 is the width of the box.
BOX (5, 0, 5), 5 is the depth of the box, 0 is the width of the border and 5 is the number of shading in the box. (1 is the light shade and 100 are black.)

GRAPHICS (3, 5, 9) HORZ-LINE (20)
GRAPHICS (3, 5, 9) VERT-LINE (20)

In both of the above examples HORZ-LINE (20), 20 is the thickness of the line.

One can insert images with PRINT-IMAGE command.

Following is the code for this:
Print-image (1, 1)
Type=bmp-file
Image-Size= (20, 5)
Source= imagename.bmp

Source should be the complete file path of the image if the image resides in the same folder in which the sqr is then there is no need of full path only image name will work. The format of the image must match that of the printer you are using. These formats are:

1) Windows—bmp file images
2) PostScript printer or viewer—eps file
3) HP LaserJet—hpgl file images
4) HTML output—GIF or JPEG formats (gif file or jpeg file)

OCI - Attach Block Volume to Windows VM

Tip: Although creating and attaching Block Storage to a Windows VM is pretty straightforward (OCI documentation is pretty good for that), th...