Solved SalReportPrintToFile PDF Crash

Report bugs and possible workarounds.
chelonet
Argentina
Posts: 75
Joined: 19 Apr 2017, 15:28
Location: Argentina

SalReportPrintToFile PDF Crash

Post by chelonet » 10 Oct 2013, 23:19

Hi,
When I use to print a PDF the function "SalReportPrintToFile" , issues the following message and hangs:

Exception:
Message:
Conditional expression:
Filename:
Function:
Linenumber: 232

Attached TestCase
TD 6.1 SP3R- Build 34099

Please I need a quick solution.
Thanks
You do not have the required permissions to view the files attached to this post.

Mike Vandine

Re: SalReportPrintToFile PDF Crash

Post by Mike Vandine » 15 Oct 2013, 04:00

Hi,

I cannot reproduce this with TD6.1 SP4. Please try installing that version and test again.

Best regards,

alasoft

Re: SalReportPrintToFile PDF Crash

Post by alasoft » 17 Oct 2013, 18:46

Hi .. here Roberto ..

We have tested the same project with TD 6.1 SP4 .. and exactly the same error happened ..

What's going on here ?

Please we need urgent help with this !!

Thanks

Rober

chelonet
Argentina
Posts: 75
Joined: 19 Apr 2017, 15:28
Location: Argentina

Re: SalReportPrintToFile PDF Crash

Post by chelonet » 18 Oct 2013, 19:43

Hi mvandine,
We have tested the same project with TD 6.1 SP4 .. and exactly the same error happened ..
We also found that the error occurs in Windows XP SP3 (TD61 SP3 and SP4).
You can try it in XP?

In windows 7 works both correctly.
What may be missing in XP? What dlls are used ?

Thanks

VEspinal

Re: SalReportPrintToFile PDF Crash

Post by VEspinal » 14 Nov 2013, 23:58

Hi:

Try the following:
Call SalFileOpen(hFile, "C:\\TEMP\\TEST.PDF", OF_Delete)
Call SalFileClose(hFile)
Call SalReportPrintToFile( hWndForm, 'TEST.QRP', 'C:\\TEMP\\TEST.PDF', 'texline','texline',1,RPT_PrintAll | RPT_PrintNoWarn,0,0, 2,Error )

HTH

Regards,
Victor

alasoft

Re: SalReportPrintToFile PDF Crash

Post by alasoft » 20 Nov 2013, 15:02

Hi ..

Call SalFileOpen(hFile, "C:\\TEMP\\TEST.PDF", OF_Delete)
Call SalFileClose(hFile)


simply delete the File .. then ..

Call SalReportPrintToFile( hWndForm, 'TEST.QRP', 'C:\\TEMP\\TEST.PDF', 'texline','texline',1,RPT_PrintAll | RPT_PrintNoWarn,0,0, 2,Error )


throws some 'exception' .. simply because the file does no exists any more

So, that was not a solution .. :-)

Regards

Rober

alasoft

Re: SalReportPrintToFile PDF Crash

Post by alasoft » 22 Nov 2013, 20:10

Here te sample application again ..

Thanks !!

Rober
You do not have the required permissions to view the files attached to this post.

VEspinal

Re: SalReportPrintToFile PDF Crash

Post by VEspinal » 23 Nov 2013, 01:49

Hi Rober:

Yes, you need to delete the file.

I am attaching your revised apt (TD 6.1 SP4) and the pdf created.

It works fine for me.

Regards,
Victor Espinal
You do not have the required permissions to view the files attached to this post.

alasoft

Re: SalReportPrintToFile PDF Crash

Post by alasoft » 26 Nov 2013, 22:04

'Yes, you need to delete the file.' ...

BUT .. if we do this, then SalReportPrintToFile does not find de report file ! ..

I don't get it, sorry.

Rober

VEspinal

Re: SalReportPrintToFile PDF Crash

Post by VEspinal » 26 Nov 2013, 23:32

Hi:

You need to delete the pdf file not the report file.

Since you are creating a new one, it does matter to be deleted.

I have tried my small app several times and it is working fine for me. It has to do with your current environment.

Thanks
Victor Espinal

chelonet
Argentina
Posts: 75
Joined: 19 Apr 2017, 15:28
Location: Argentina

Re: SalReportPrintToFile PDF Crash

Post by chelonet » 16 Dec 2013, 23:00

Hi Victor,
What do you suggest to check in the enviroment ?
What internal processes are involved? dlls ?

Thanks

VEspinal

Re: SalReportPrintToFile PDF Crash

Post by VEspinal » 17 Dec 2013, 20:18

Hi:

Make sure that you are not using old dlls. If that's the case change them to 6.1 dll

Did you check your path? Do you have another instance of TD in your machine?

Check under Tools --> Preferences --> Directories, if the path is pointing to the TD 6.1 directory?

If this can be possible, can you try to isolate the problem by having just one TD installed and test it again.

Thanks,

Victor Espinal

chelonet
Argentina
Posts: 75
Joined: 19 Apr 2017, 15:28
Location: Argentina

Re: SalReportPrintToFile PDF Crash

Post by chelonet » 23 Dec 2013, 15:22

Unfortunately, it is not solved.
I tried it on six computers, and all fails with error:

Exception:
Message:
Conditional expression:
Filename:
Function:
Linenumber: 232


(With TestCase prueba.zip of Victor Espinal)

In all cases, it fails with Windows XP, and works well with Windows Seven
I tried installing the Deploy TD on computers where no TD, both SP3 and SP4, and also fails.

You can try it in Windows XP with TD 6.1 SP3?.

Thanks

chelonet
Argentina
Posts: 75
Joined: 19 Apr 2017, 15:28
Location: Argentina

Re: SalReportPrintToFile PDF Crash

Post by chelonet » 03 Jan 2014, 21:53

hI
I think I discovered what the problem is, or at least have an orientation.
If I use any QRP with NOT TRUE TYPE font, the error occurs.
This was also tried with SalReportPrintToFileEx function with SalReportPrintToFileEx = 1 or 2, and outputs the error "Font is not installed."
From what I gather to print to PDF, you just have to use only TRUE TYPE fonts.
See images.

Is there any way to detect all QRPs using particular source? (I have over 1000 QRPs).

Thanks
You do not have the required permissions to view the files attached to this post.

VEspinal

Re: SalReportPrintToFile PDF Crash

Post by VEspinal » 08 Jan 2014, 18:48

Hi there:

No, there is no way to detect all QRPS using particular source.

Did you think on the possibility on using a font conversion software?

HTH

Regard,
Victor Espinal

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests