Can´t access file until CONFIRM event

txerifftxeriff Member Posts: 500
edited 2012-09-27 in NAV Three Tier
Hi,

I´d like to ask about this:

It´s a strange thing but its the only way we solved it.

When printing a file using pdfcreator we are unable to access to the file using .net varibles until we launch a confirm window asking something. Commit, sleep... doesnt work. Seems like CONFIRM its the only event that raises the event and makes the pdf file to appear. Until that you wont be able to access the file. In NAV classic client used to work properly.

Any ideas?

:lol:

resp:=CONFIRM(message);
//After confirm you can find the file
IF T79.GET THEN;
IF T79.RutaDirectorioPDF <> '' THEN
  IF TObjetos.GET(TObjetos.Type::Report,'',Informe) THEN
    BEGIN
      TObjetos.CALCFIELDS(  Caption);
      TiempoIN := TIME;
      NombreFichero:=TObjetos.Caption;
      NombreFichero:=NombreFichero+'.pdf';
//      NombreFichero2:=TObjetos.Caption+'-'+NumDocumento+'.pdf';
      fichero.WRITEMODE(TRUE);

Comments

  • Tommy_SchouTommy_Schou Member Posts: 117
    Haven't been in that particular situation but NAV has always been a bit strange with regards to file handling.

    Maybe try to open a temporary file and then just close it again instead of using your confirm dialog. Maybe it will release the pdf file then and let you get on with "life" :)
    Best regards
    Tommy
Sign In or Register to comment.