You are reading help file online using chmlib.com
|
Rave Reports Developer Reference TBaseReport. RegisterGraphic method |
Top Previous Next |
Declaration procedure RegisterGraphic( index: integer);
Category
Description This method will help manage repeating, large bitmaps in a print job. You can register up to 10 bitmaps at once by passing in the index value from 1 to 10. With this method only one copy of the bitmap would be stored in the file with all other print functions referencing the same copy.
NOTE: Use UnregisterGraphic( n ) to make sure that the graphic index that you are using is cleared.
NOTE: This method will only optimize the execution of a report through TRvNDRWriter.
See also TBaseReport Class, ReuseGraphic, UnregisterGraphic
Example (Delphi) Bitmap := TBitmap.Create; with Sender as TBaseReport do try Bitmap.LoadFromFile( 'LOGO.BMP' ); UnregisterGraphic( 1 ); while not Table1.EOF do begin ReuseGraphic( 1 ); PrintBitmapRect( 1,1,2,2,Bitmap ); RegisterGraphic( 1 ); { other printing code } end; { while } finally Bitmap.Free; end; { with }
Example (C++Builder) Bitmap = new TBitmap(); try { Bitmap->LoadFromFile( "LOGO.BMP" ); rp1->UnregisterGraphic( 1 ); while (!Table1->Eof) { rp1->ReuseGraphic( 1 ); rp1->PrintBitmapRect( 1,1,2,2,Bitmap ); rp1->RegisterGraphic( 1 ); / other printing code }/ while } __finally { delete Bitmap; }/ tryf |
You are reading help file online using chmlib.com
|