CTD Crash if using € as variable in SalReportPrintToFile

Report bugs and possible workarounds.
wyskens
Belgium
Posts: 16
Joined: 21 Apr 2017, 12:15
Location: Oostkamp, Belgium

CTD Crash if using € as variable in SalReportPrintToFile

Post by wyskens » 10 Feb 2016, 10:53

When we use the function SalReportPrintToFile(Ex) CTD crashes the second time we run the app
But if we use the SalReportPrint it all runs normal.

Does anybody know how we can prevent this crash with SalReportPrintToFile?
We're using 5.2 (SP3)

I've included an app with QRP and the examples

Tanks in Advance,
Thomas
You do not have the required permissions to view the files attached to this post.

User avatar
Charlie
Canada
Posts: 595
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: CTD Crash if using € as variable in SalReportPrintToFile

Post by Charlie » 10 Feb 2016, 14:14

Workaround: check for existence of the PDF file, delete it if it exists, then call SalReportPrintToFileEx()

wyskens
Belgium
Posts: 16
Joined: 21 Apr 2017, 12:15
Location: Oostkamp, Belgium

Re: CTD Crash if using € as variable in SalReportPrintToFile

Post by wyskens » 10 Feb 2016, 15:53

Charlie,

The problem isn't that the PDF already exists (if you delete it inbetween there is no problem, or if you close the application, restart it and do the print again, there is also no problem).

The problem is that CTD Crashes if you run the app twice (without closing it) when you print to a report with a '€' as a (part of a) value in a variable.

If you run the example, you'll see what I mean.

Grz,
Thomas

User avatar
Charlie
Canada
Posts: 595
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: CTD Crash if using € as variable in SalReportPrintToFile

Post by Charlie » 10 Feb 2016, 19:36

This only happens when running the app from CTD.

No issues running the app as an executable.

Is that right?

User avatar
Charlie
Canada
Posts: 595
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: CTD Crash if using € as variable in SalReportPrintToFile

Post by Charlie » 10 Feb 2016, 20:07

Try:

Code: Select all

Call SalReportPrintToFileEx( hWndForm, 'DummyEuro.QRP', 'DummyEuroEx.PDF', sVar, sInput, 1, RPT_PrintAll, -1, -1, 2,nErr , 2,1,0,0)
The euro symbol and the "FontOption" 1 (Import true type font for non-unicode only) do not seem to want to play together.

FontOption 2 (Import true type font for all strings) seems to work A-1.

Maybe that's a good enough workaround?

wyskens
Belgium
Posts: 16
Joined: 21 Apr 2017, 12:15
Location: Oostkamp, Belgium

Re: CTD Crash if using € as variable in SalReportPrintToFile

Post by wyskens » 23 Feb 2016, 08:30

Charlie,

That seems to work, thanks for your answer.

Grz,
Thomas

User avatar
Charlie
Canada
Posts: 595
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: CTD Crash if using € as variable in SalReportPrintToFile

Post by Charlie » 23 Feb 2016, 12:33

Good stuff !

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 0 guests