Page 1 of 1

Error in (OLD) Report

Posted: Mon Oct 05, 2009 1:26 am
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,

Re: Error in (OLD) Report

Posted: Mon Oct 05, 2009 4:50 pm
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.

Re: Error in (OLD) Report

Posted: Mon Oct 05, 2009 9:09 pm
by Vanguarda
ok master, i´ll make a little sample about this.
Thanks,
regards,

Re: Error in (OLD) Report

Posted: Mon Oct 05, 2009 9:35 pm
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,

Re: Error in (OLD) Report

Posted: Mon Oct 05, 2009 9:49 pm
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.