i want to copy one table to image and save it
how can i do it
thanks
Copy table to image?
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You need to copy the table to TRVReportHelper and draw its content as an image.
Let the Table is in RichView1.
Assign
RVReportHelper1.Style := RichView1.Style;
Copy:
Then create an image from RVReportHelper1. See the demo in Demos\DelphiUnicode\Assorted\Graphics\ToImage.
Let the Table is in RichView1.
Assign
RVReportHelper1.Style := RichView1.Style;
Copy:
Code: Select all
var TableCopy:TRVTableItemInfo;
Stream: TMemoryStream;
TableCopy := TRVTableItemInfo.CreateEx(1,1, RVReportHelper1.RichView.RVData);
Stream := TMemoryStream.Create;
Table.SaveToStream(Stream);
Stream.Position := 0;
TableCopy.LoadFromStream(Stream);
Stream.Free;
RVReportHelper1.RichView.Clear;
RVReportHelper1.RichView.AddItem('', TableCopy);