Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Out of resources

edited December 2003 in General
I very often get Out of resources when using a RichText in my reports.

is it me that are doing something wrong or is this problem due to something
else.?
I usually get this problem if I step back one page in the preview.

What I do is something like this:


procedure TDllReportForm.ppRichText1Print(Sender: TObject);
var
p : pointer;
begin
if not ppDetailBand3.OverFlow then
begin
FDefaultFont.Name := 'Tahoma';
FDefaultFont.Size := 10;
if
BlockNode.Item[ppjitplBlock.RecordIndex-1].Item[BlockItemArray[ppjitplBlockI
tem.RecordIndex-1]].Data <> nil then
begin
if TQuote(LocalTreeView.Items[0].Data).PreviewSettings.ArtNo then
ppRichText1.SelText:=
FormatArtNo(TBlockItem(BlockNode.Item[ppjitplBlock.RecordIndex-1].Item[Block
ItemArray[ppjitplBlockItem.RecordIndex-1]].Data).ArtNo) + CRLF;
ppRichText1.SelText:=
TBlockItem(BlockNode.Item[ppjitplBlock.RecordIndex-1].Item[BlockItemArray[pp
jitplBlockItem.RecordIndex-1]].Data).Descr

//ppRichText1.LoadFromRTFStream(RTFHelper.StrToStream(TBlockItem(BlockNode.I
tem[ppjitplBlock.RecordIndex-1].Item[BlockItemArray[ppjitplBlockItem.RecordI
ndex-1]].Data).descr));
end;
p :=
PChar(TBlockItem(BlockNode.Item[ppjitplBlock.RecordIndex-1].Item[BlockItemAr
ray[ppjitplBlockItem.RecordIndex-1]].Data).descr);
if TRTFTag(P^)<>'{\rtf' then
begin //It's not an RTF stream
ppRichText1.SelectAll;
ppRichText1.SelAttributes.Assign(FDefaultFont);
end;
end;

Comments

  • edited December 2003
    I have also tried to load the Whole Rich text directly.

    It seams like this OutOf Resources comes when the RichText wraps to more
    than One page.
    if it fit on the page everything is ok.

    BR

    Magnus

  • edited December 2003
    It seems like I only have this problem if I have the ppRichText
    transparent.



  • edited December 2003
    Hi Mangus,

    It is a known issue that some printers do not support transparent objects.
    If the problem is only occuring when the ppRichText is transparent, this is
    most likely the issue. For this specific printer, the transparency property
    will need to be set to False.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    The problem is not only when I try to print to the printer.
    The problem is when I try to make a preview. Are there any printer driver
    used then?

    BR

    Magnus


  • edited December 2003
    Hi Mangus,

    Yes, the printer driver is used to render the report to the screen as well
    as to the printer. If you would like, you can send us a small example
    report that shows this behavior and we can test on our printers.
    support@digital-metaphors.com.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.