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

Public forum for discussing TScaleRichView (shareware addon to TRichView providing WYSIWYG editing)
Post Reply
sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

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

Post by sylvainl » Thu Oct 30, 2014 1:51 pm

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

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Sun Nov 02, 2014 11:55 am

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.

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Mon Nov 03, 2014 8:09 am

Great news, thanks

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Mon Nov 03, 2014 8:55 am

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).

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Tue Nov 04, 2014 8:07 am

Thanks Sergey, now problem anymore with the new verison :)

++
SylvainL

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Fri Nov 14, 2014 11:45 am

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

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Fri Nov 14, 2014 1:11 pm

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

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Fri Nov 14, 2014 3:25 pm

Ok, thanks for your help,
I'll send you my RVF file via email now.

SylvainL

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Mon Nov 17, 2014 9:49 am

Thank you, Sergey
With the fix you sent me, I have no more the metafile problem.

SylvainL

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Sat Nov 22, 2014 10:20 am

Fixed in SRV 6.1.3
It was more PDF problem than metafile problem, because unnecessary drawing was clipped in metafiles.

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Mon Nov 24, 2014 9:53 am

Thank you, it works perfectly.

SylvainL

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Thu Jan 08, 2015 9:30 am

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

Sergey Tkachenko
Site Admin
Posts: 13467
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Thu Jan 08, 2015 8:45 pm

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

sylvainl
Posts: 24
Joined: Thu Oct 09, 2014 10:18 am

Post by sylvainl » Fri Jan 09, 2015 9:09 am

Big thanks, Sergey.
No more the problem, with this fix.

++
SylvainL

Post Reply