FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio:
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
To Antonio:
Posted: Fri Dec 07, 2012 05:32 PM
Antonio:

I'm getting the following report before the report engine displays the report:
Error(6) deleting enhanced metafile

Error description

It is a small dialog with the Ok button and nothing else.

The preview window does not goes away and it stand stills at the report's last page (showing page number 77 and the printer icon).
When I press the preview button, it goes away and after pressing the Ok button (on the error dialog) the reports is displayed.

What I'm trying to do is print a counter on the same line as the grand totals. Thank you.

Windows XP Pro SP3 x86, 8GB RAM (3.25GB usable), Intel Core 2 Quad 3.00GHz, C: partition SSD 38GB free
Code (fw): Select all Collapse
         ACTIVATE REPORT oRep ;
            ON CHANGE {|| IIF(EVAL(bForCond) .AND. Fecha_ingr <= dDueDate, ;
                              ListStocks(@aVars), NIL)}                    ;
            ON END {|| DispCnt1 (@aVars)}

STATIC PROCEDURE DispCnt1 (aParms)
   #define oReport   aParms[10]
   #define nCtr      aParms[19]

   LOCAL nI

   FOR nI := 1 TO 2
      oReport:StartLine()
      oReport:EndLine()
   NEXT
   oReport:StartLine()
   oReport:Say( 1, "Total: " + LTRIM(STR(nCtr,7)), , 1 )
   oReport:EndLine()

   #undef oReport
   #undef nCtr
RETURN
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: To Antonio:
Posted: Fri Sep 13, 2013 08:44 AM

Hunter, did you find a solution for your problem?
Best regards,
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: To Antonio:
Posted: Fri Sep 13, 2013 09:06 AM

Otto,

is it using the printer preview or using the reports engine and the preview ?

Usually you get this because there is an unbalanced Page endPage

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: To Antonio:
Posted: Fri Sep 13, 2013 02:47 PM
HunterEC:

Please try the next function

Code (fw): Select all Collapse
STATIC PROCEDURE DispCnt1 (aParms)
   #define oReport   aParms[10]
   #define nCtr      aParms[19]

   LOCAL nI

   FOR nI := 1 TO 2
      oReport:StartLine()
      oReport:EndLine()
      OverFlow(oReport)               // Add this line
   NEXT
   oReport:StartLine()
   oReport:Say( 1, "Total: " + LTRIM(STR(nCtr,7)), , 1 )
   oReport:EndLine()
   OverFlow(oReport)                   // Add this line

   #undef oReport
   #undef nCtr
RETURN


STATIC FUNCTION OverFlow(oReport)
    IF (oReport:nRow + (oReport:nStdLineHeight * 2)) >= oReport:nBottomRow
        oReport:EndPage()
        oReport:StartPage()
    ENDIF
RETURN NIL


I hope these can help you

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion