Page 1 of 1

Error on Rpreview/PRV2PDF.PRG

Posted: Thu Sep 19, 2019 3:44 pm
by Silvio.Falconi
When I print my document I use a function to converte the time

// Time To Seconds
FUNCTION TTOS( cTime )
default cTime:= time()
RETURN ( VAL( SUBSTR( cTime, 1, 2 )) * 3600 + ;
VAL( SUBSTR( cTime, 4, 2 )) * 60 + ;
VAL( SUBSTR( cTime, 7, 2 )) ;
)

it run ok when I go to Rpreview and I can show the document as you can see here

Image

If I try to create a Pdf it make error

Code: Select all

 
 Error description: Error BASE/1110  Parametro errato: SUBSTR
   Args:
     [   1] = T   19-09-2019 17:33:34.246
     [   2] = N   1
     [   3] = N   2

Stack Calls
===========
   Called from:  => SUBSTR( 0 )
   Called from: source\ut\ut_timeCa.prg => TTOS( 340 )
   Called from: .\source\function\PRV2PDF.PRG => FWPDF:CLOSE( 232 )
   Called from: .\source\function\PRV2PDF.PRG => FWSAVEPREVIEWTOPDF( 62 )
   Called from: .\source\classes\RPREVIEW.PRG => TPREVIEW:SAVEAS( 1783 )
   Called from: .\source\classes\RPREVIEW.PRG => (b)TPREVIEW:TPREVIEW( 50 )

Re: Error on Rpreview/PRV2PDF.PRG

Posted: Thu Sep 19, 2019 6:02 pm
by TecniSoftware
En tu error.log el parametro no tiene formato de hora sino date time, dice 19-09-2019 17:33:34.246

Re: Error on Rpreview/PRV2PDF.PRG

Posted: Thu Sep 19, 2019 7:48 pm
by cnavarro
Silvio, The TTos function already exists in Fwh, do you know?

Re: Error on Rpreview/PRV2PDF.PRG

Posted: Fri Sep 20, 2019 1:36 pm
by Silvio.Falconi
sorry it is an oldest app fw16 ( fw19.5) I 'm converting..I not remember what I made more of ten year ago