SalReportPrint - seems not to work

Discussion forum about all things Report Builder (all versions).
Johann
Austria
Posts: 369
Joined: 30 Mar 2017, 09:58
Location: Vienna

SalReportPrint - seems not to work

Post by Johann » 29 May 2012, 13:23

Hi to All,

I get always an errorno: 8 (cannot open printer....) when printing with the function SalReportPrint(), SalReportView() is Ok. Can somebody proof that with the attached sample (I modified the RTFSample a little bit)

Regards
Hans

PS: If this is a bug, it's a showstopper for us, because we have to print receipts with SalReportPrint() on a POS
You do not have the required permissions to view the files attached to this post.

Jeff Luther

Re: SalReportPrint - seems not to work

Post by Jeff Luther » 30 May 2012, 01:53

Well, your test case works for me, though nothing gets INSERTed and thus not fetched. But, the app runs, preview mode comes up OK for me.

There's the problem, first param. should be a '2' in 3 places in the code ('1' is the ID column):
Call SqlSetLongBindDatatype(2, 23)

Aha, text is assumed in the RTF control so I added some. Run my mod. test, attached. Note where SqlSetLongBindDatatype() calls are:
insert/update -- between SqlPrepare and SqlExecute calls
fetch -- after sqlprepExe and before SqlFetchXXX

I get this when I run in preview:
JL_PreviewSample.png
Anyway, the test works and I don't get a printer error to my HP 1320 and preview works OK too.
You do not have the required permissions to view the files attached to this post.

Johann
Austria
Posts: 369
Joined: 30 Mar 2017, 09:58
Location: Vienna

Re: SalReportPrint - seems not to work

Post by Johann » 30 May 2012, 07:08

Jeff,

I know that the preview mode is Ok, thats what I didn't ask to test! I asked to test the direct printing with the SalReportPrint() function (see subject!). This is the other print button.

Regards
Hans

Johann
Austria
Posts: 369
Joined: 30 Mar 2017, 09:58
Location: Vienna

Re: SalReportPrint - seems not to work

Post by Johann » 30 May 2012, 08:41

Jeff,

don't know what happened. After reboot of my notebook, the printing is working as it should! I have here some strange things, maybe you have an advice for me what to do.

e.g. I have here an external dll which works a small test apl normally. The dll is located in the app dir. When trying to call the dll out from the big app, the dll is not found. Out from the exe everything works normally. Then I tried to copy the dll into the TD dir - after this it worked fine also out from the big app.

What I did before migration: I saved all my apl's as apt. After loading with 6.0 IDE I opened not every apt and saved it with 6.0 IDE, only those one where I had to change something e.g. SalStrSetBuffer() etc. But I will do this now, hoping that everything gets normal.

Regards
Hans

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests