Error in (OLD) Report

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Error in (OLD) Report

Post by Vanguarda »

Hi friends,

I´ve a program that print a simple report. Follow my code bellow. This code is of the my FILE RPT.

Code: Select all

DEFINE REPORT TEMPLATE
    TITLE "Cadastro de definições"
    HEADERS {"",""},{"Código","Descrição"}
    FIELDS {"ID","DESCRICAO"}
    WIDTHS {7,65}
    TOTALS {.f.,.f.}
    NFORMATS {"999999",""}
    WORKAREA DEFINICAO
    LPP 50
    CPL 80
    LMARGIN 2
    PREVIEW
    SELECT
    PAPERSIZE DMPAPER_A4
END REPORT
I call this report with this code bellow:

Code: Select all

Function Def_REPTO()
   DBUseArea(.T.,,DEFINICAO,DEFINICAO,.t.)
   DO REPORT FORM DEFINICAO
   DBCloseArea("DEFINICAO")
Return Nil
It´s work fine, but when a execute this command bellow in other istance of my program:

Code: Select all

Function Read_Logs(cArea)
            DBUseArea(.T.,,cArea,cArea,.t.)
	    edit extended workarea &cArea
	    DBCloseArea(cArea)
Return Nil
And after try execute my report once again, i´ve this error:
Please see the picture in Attachment.

What happend? where my code is wrong?


I´m use HMG Version 2.9.5 (2009.09.30).
And HMG-IDE 2.9.4.
Windows XP SP/2 with default theme.


I thank´s any help.

With best regards,
Attachments
ERRO.JPG
ERRO.JPG (28.41 KiB) Viewed 2694 times
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Error in (OLD) Report

Post by Roberto Lopez »

Vanguarda wrote:Hi friends,

I´ve a program that print a simple report. Follow my code bellow. This code is of the my FILE RPT.

Code: Select all

DEFINE REPORT TEMPLATE
    TITLE "Cadastro de definições"
    HEADERS {"",""},{"Código","Descrição"}
    FIELDS {"ID","DESCRICAO"}
    WIDTHS {7,65}
    TOTALS {.f.,.f.}
    NFORMATS {"999999",""}
    WORKAREA DEFINICAO
    LPP 50
    CPL 80
    LMARGIN 2
    PREVIEW
    SELECT
    PAPERSIZE DMPAPER_A4
END REPORT
I call this report with this code bellow:

Code: Select all

Function Def_REPTO()
   DBUseArea(.T.,,DEFINICAO,DEFINICAO,.t.)
   DO REPORT FORM DEFINICAO
   DBCloseArea("DEFINICAO")
Return Nil
It´s work fine, but when a execute this command bellow in other istance of my program:

Code: Select all

Function Read_Logs(cArea)
            DBUseArea(.T.,,cArea,cArea,.t.)
	    edit extended workarea &cArea
	    DBCloseArea(cArea)
Return Nil
And after try execute my report once again, i´ve this error:
Please see the picture in Attachment.

What happend? where my code is wrong?


I´m use HMG Version 2.9.5 (2009.09.30).
And HMG-IDE 2.9.4.
Windows XP SP/2 with default theme.


I thank´s any help.

With best regards,
If you could post a complete sample for test could be very useful to track the problem.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: Error in (OLD) Report

Post by Vanguarda »

ok master, i´ll make a little sample about this.
Thanks,
regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Vanguarda
Posts: 543
Joined: Wed Feb 11, 2009 10:56 am
Location: Americana - SP
Contact:

Re: Error in (OLD) Report

Post by Vanguarda »

Master, i´ve found my error...
My error is: I don´t have recompiled my project with "Reset Project Incremental Data"

I did it and the error is over. :o

I´m a very stupid man. :oops:

Thanks for your patience and help

With best regards,
--
Paulo Sérgio Durço (Vanguarda)


http://hmglights.wordpress.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: Error in (OLD) Report

Post by Roberto Lopez »

Vanguarda wrote:Master, i´ve found my error...
My error is: I don´t have recompiled my project with "Reset Project Incremental Data"
I did it and the error is over. :o
No problem!

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply