Page 1 of 1

Problem with Tables and Heading Row (table disapear in part)

Posted: Thu Oct 30, 2014 1:51 pm
by sylvainl
Hi,

I have a problem with my tables and the TScaleRichViewEdit (v6).
I use "HeadingRowCount :=1" for the tables, it's typical quotation tables with products, quantities and prices.

But the problem is my tables disapear if they are to close from the bottom of a page (and I don't see them on the next page)

If I dontt use the heading rows (HeadingRowCount := 0), there is no problem, the table is cut as expected (start on the 1st page and continue on the next).

I join my example RVF file (you can open with the ActionTestUni demo executable) :
http://we.tl/3Vwr4sKYZA
(The table problem is in red on my example)

Can you help me, or maybe already fixed in the next release ?

Again, thanks for your help

++
SylvainL

Posted: Sun Nov 02, 2014 11:55 am
by Sergey Tkachenko
Yes, there is a problem with tables containing one heading row and one non-heading row. We already fixed it in our working version, but not uploaded it yet. We plan to upload fixed version for registered users tomorrow.

Posted: Mon Nov 03, 2014 8:09 am
by sylvainl
Great news, thanks

Posted: Mon Nov 03, 2014 8:55 am
by Sergey Tkachenko
Fixed in SRV 6.1.2, available for registered users.
You can download the installer from the same location as the previous version.
You can find links in the private "ScaleRichView" forum (I opened protected forums for you).

Posted: Tue Nov 04, 2014 8:07 am
by sylvainl
Thanks Sergey, now problem anymore with the new verison :)

++
SylvainL

Posted: Fri Nov 14, 2014 11:45 am
by sylvainl
Hi Sergey,

I have another problem now, still with HeadingRow>0 (and SRV 6.1.2).

This is the context :
Page 1 : a big table (5 cols and 10 rows) at the end of the page, with HeadingRow=1, only 2 rows on the page (the rest on page2)
Page 2 : the headingRow is here ok and the rows.

But...
When I generate metafiles (SRVE.DrawMetafile) the metafile of page 2, with the HeadingRow, is incorrect (seems to have headingrow AND the first row of the table) drawn in the metafile.

The problem is visible when you generate PDF file with the metafiles.

Am I doing something wrong ?
The code I use to make metafiles from my SRVE Pages :

Code: Select all

function MakePageMetafileFromSRVE(SRVE: TSRichViewEdit; APageNo, AWidth, AHeight: Integer): TMetafile;
var
  savTextDraw: Boolean;
begin
  Result := nil;
  savTextDraw := ScaleRichViewTextDrawAlwaysUseGlyphs;
  ScaleRichViewTextDrawAlwaysUseGlyphs := False;

  Result := TMetafile.Create;
  Result.Width := aWidth;
  Result.Height := aHeight;
  srve.CanUpdate := False;
  srve.UseDrawHyperlinksEvent := True;
  srve.DrawMetafile(aPageNo, Result, False, False, False);

  ScaleRichViewTextDrawAlwaysUseGlyphs := savTextDraw;
  srve.CanUpdate := True;
  srve.UseDrawHyperlinksEvent := False;
end;

Thanks for your help

Best regards,
SylvainL

Posted: Fri Nov 14, 2014 1:11 pm
by Sergey Tkachenko
I cannot reproduce this problem (it looks very strange to me, because the same procedure is used for drawing a metafile and a page in TSRichViewEdit).
Please send your document to rvf file and send to me richviewgmailcom

PS: do not change ScaleRichViewTextDrawAlwaysUseGlyphs. The default value is now false; true caused too many problems

Posted: Fri Nov 14, 2014 3:25 pm
by sylvainl
Ok, thanks for your help,
I'll send you my RVF file via email now.

SylvainL

Posted: Mon Nov 17, 2014 9:49 am
by sylvainl
Thank you, Sergey
With the fix you sent me, I have no more the metafile problem.

SylvainL

Posted: Sat Nov 22, 2014 10:20 am
by Sergey Tkachenko
Fixed in SRV 6.1.3
It was more PDF problem than metafile problem, because unnecessary drawing was clipped in metafiles.

Posted: Mon Nov 24, 2014 9:53 am
by sylvainl
Thank you, it works perfectly.

SylvainL

Posted: Thu Jan 08, 2015 9:30 am
by sylvainl
Hi guys,

I have same kind of problem, but at the end of 1st page now (last time it was the begining of 2nd page), when I generate metafile from a RVF file (2 tables separated by a pagebreak)

Here is my RVF file :
https://userscloud.com/cxjjawrf4q5e

The metafile generated looks fine (when I open with paint for example), but when I use them to generate PDF file, there is unnecessary informations at the end of the 1st page (drawing first row of page 2).

Ans still, the problem is visible when you generate PDF file with the metafiles.

Could you help me to fix that pbm ?
Thanks in advance

++
SylvainL

Posted: Thu Jan 08, 2015 8:45 pm
by Sergey Tkachenko
Quick fix:

Open SclRView.pas, find

Code: Select all

      if PageStartTableItem[Result] >= 0 then
        PageEndItemNo[Result - 1] := PageStartTableItem[Result]
      else
change to:

Code: Select all

      if PageStartTableItem[Result] >= 0 then begin
        if PageStartTableRow[Result] = 0 then
          PageEndItemNo[Result - 1] := PageStartTableItem[Result]-1
        else
          PageEndItemNo[Result - 1] := PageStartTableItem[Result];
      end else

Posted: Fri Jan 09, 2015 9:09 am
by sylvainl
Big thanks, Sergey.
No more the problem, with this fix.

++
SylvainL