Rich no print!

Hello,

1. I make new report.
2. In MasterData put RichObject write long text on 5 lines.
3. Set True to MasterData/AllowSplit and Streched.
4. Set smMaxHeight in RichObject.
5. Preview.

All look normal. Rich show correctly but when print the text show in top-left corner in small margins.
How to fix the problem or this is BUG?

Thank you.

Comments

  • edited 12:21PM
    Hello again,
    I return version 3.03 and this problem fix. Maybe problem is in version 3.04.

    Please check version 3.04.
    Thanks
  • edited 12:21PM
    ????
  • edited 12:21PM
    Please change the frxRich.pas file:
    procedure TfrxRichView.DrawRich;
    var
      Range: TFormatRange;
      LogX, LogY: Integer;
      EMFCanvas: TMetafileCanvas;
      EMF: TMetafile;
    begin
      EMF := nil;
      EMFCanvas := nil;
      FillChar(Range, SizeOf(TFormatRange), 0);
    
      with Range do
      begin
        if IsPrinting then
        begin
          hdc := FCanvas.Handle;
          LogX := GetDeviceCaps(hdc, LOGPIXELSX);
          LogY := GetDeviceCaps(hdc, LOGPIXELSY);
          rc := Rect(FX * 1440 div LogX, FY * 1440 div LogY,
            FX1 * 1440 div LogX, FY1 * 1440 div LogY);
        end
        else
        begin
          LogX := 96;
          LogY := 96;
          EMF := TMetafile.Create;
          EMF.Width := Round(Width);
          EMF.Height := Round(Height);
          EMFCanvas := TMetafileCanvas.Create(EMF, 0);
          if Color = clTransparent then
            FRichEdit.Color := clWhite else
            FRichEdit.Color := Color;
          hdc := EMFCanvas.Handle;
          rc := Rect(Round(GapX * 1440 / LogX), Round(GapY * 1440 / LogY),
            Round((Width - GapX) * 1440 / LogX),
            Round((Height - GapY) * 1440 / LogY));
        end;
    
        rcPage := rc;
        hdcTarget := hdc;
    
        chrg.cpMin := 0;
        chrg.cpMax := -1;
        FRichEdit.Perform(EM_FORMATRANGE, 1, Integer(@Range));
      end;
    
      FRichEdit.Perform(EM_FORMATRANGE, 0, 0);
    
      if not IsPrinting then
      begin
        EMFCanvas.Free;
        FCanvas.StretchDraw(Rect(FX, FY, FX1, FY1), EMF);
        EMF.Free;
      end;
    end;
    
  • edited 12:21PM
    I have same problem, but I have Standard edition of FR 3.04, so I don't have frxRich.pas. Can you please change it in file to be donwloaded in Download area? Or do I have to wait for FR 3.05 ?

    Lubos
  • edited 12:21PM
    Wait for 3.05, it will out soon.
  • edited 12:21PM
    How soon is soon? Is there a date for the new Release?
  • edited 12:21PM
    In the next week.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.