I need to generate a PDF from report and i don`t know why the first time i execute the code is OK but when i change the name of the file and execute again the code it saves the report with the first name. Somebody knows what is wrong?
The code:
Window.OPEN(‘En proceso …’);
WindowIsOpen := TRUE;
IF _ArchivoPDF = ‘’ THEN
ERROR(Text001);
IF Objeto.GET(Objeto.Type::Report,’’,204) THEN BEGIN
IF ISCLEAR(PDFCreator) THEN BEGIN
CREATE(PDFCreator);
PDFCreator.cStart();
END;
IF ISCLEAR(PDFCreatorError) THEN
CREATE(PDFCreatorError);
PDFCreatorError := PDFCreator.cError;
I resolved it. I forgot to save options and when i execute the code the options are always the estandar. The code is like this:
Window.OPEN(‘En proceso …’);
WindowIsOpen := TRUE;
IF _ArchivoPDF = ‘’ THEN
ERROR(Text001);
IF Objeto.GET(Objeto.Type::Report,’’,204) THEN BEGIN
IF ISCLEAR(PDFCreator) THEN BEGIN
CREATE(PDFCreator);
PDFCreator.cStart();
END;
IF ISCLEAR(PDFCreatorError) THEN
CREATE(PDFCreatorError);
PDFCreatorError := PDFCreator.cError;