Passing a Document Name to Printer Log  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Passing a Document Name to Printer Log

Postby Ernst » Thu Jan 24, 2019 2:56 pm

Using JIWA7.02 with .VB script.

Customer has found a Print Log, for Printer, and we Noticed that JIWA sends all Prints with Document Name, same as JIWA Report Name.

Customer though wouldn't it be great if we could send the Invoice No at end of Document Name, so we can track which invoice was printed when, or for example when JIWA says its printed, but the warehouse say they didn't get it.

So essentially we would like to add Invoiceno to the end of Document Name for Print.

Have had a look at Business logic. PrintingMany. But cannot seem to find DocumentName/ report.description anywhere to try and change it.

See screenshot of Print Job Log and Sales Order setup.
PrintLog.png

SOScreen.png


Would like to know if its is possible to change DocumentName/report Name sent to printer and where it could be changed...Thx.

Have been looking here in Business Logic Area.
Private Sub SalesOrder_PrintingMany(sender As Object, e As System.EventArgs, ByRef ReportCollection As JiwaApplication.JiwaCollection(Of JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport))
Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = DirectCast(sender, JiwaSales.SalesOrder.SalesOrder)
Dim SalesOrderH As JiwaSales.SalesOrder.SalesOrderHistory = salesOrder.SalesOrderHistorys(salesorder.CurrentHistoryNo)
For Each report As JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport In ReportCollection
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Passing a Document Name to Printer Log  Topic is solved

Postby Mike.Sheen » Thu Jan 24, 2019 4:51 pm

It looks like the Crystal report Title is being used as Document Name in that print log - so all that is needed is to intercept between when Jiwa pulls the report out from the database and writes it to the ProgramData folder and when the print engine picks up that file and prints it - and at that point load the report, set the Title of the SummaryInfo and then save it.

The attached plugin does this.

Mike

PS: Sorry - it's C#. Gift horses, choosing beggars et cetera.

Also - I should also point out that this will mean every time a sales order report is printed, it will always pull the copy from the database and write it to disk as the cached copy in the ProgramData folder is being modified by this plugin - so the hash will not match that in the database, and so it will always refresh the report in cache from the database.
Attachments
Plugin Override Invoice Report Title on print.xml
(38.25 KiB) Downloaded 214 times
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Passing a Document Name to Printer Log

Postby Ernst » Fri Jan 25, 2019 2:24 pm

Great thanks for that Mike, Will give it a try.
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Passing a Document Name to Printer Log

Postby Ernst » Wed Jan 30, 2019 2:29 pm

When switching that plugin on, customer reported Numerous print problems. Here is what they reported.
So here are the issues that the staff had when the new plugin was active, 3 different printing issues:

1 Grahame
It caused all the pickslips to have “Reprint” on them and print 9 identical copies – an example is 668643 – only got 9 “Reprints” (attachment 3764_001), no original and only I print record. Same with 668644.
2 Sophie
Printed invoice 668655 – only came out as a “Reprint”, they tried again and it came out again as a Reprint (attachment 3765_001) – but these were printed at 9:31 and 9:32 – but no record on Jiwa
3 Anne-Marie – she got 1 original 668657 and 2 Reprints (attachment 3766_001), same thing with invoice 668656
Once the plugin was disabled all returned to normal.

Any questions let me know.


Looking at the print log, the invoicenumber was coming through on end. But the field is not wide enough to show it. So perhaps we would need to shorten Name, or put number on front.
Is it possible to change name without reload, Perhaps that would do it? :?
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Passing a Document Name to Printer Log

Postby Mike.Sheen » Mon Feb 04, 2019 9:19 am

Ernst wrote:Looking at the print log, the invoicenumber was coming through on end. But the field is not wide enough to show it. So perhaps we would need to shorten Name, or put number on front.
Is it possible to change name without reload, Perhaps that would do it? :?


The report title is what is important here, not the name - so changing the name won't have any effect. Just modify the plugin provided to set the title to be shorter as you suggested.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Passing a Document Name to Printer Log

Postby Ernst » Tue Feb 05, 2019 12:41 pm

Yip, I could do that easy enough. But the customer reported Numerous print problems. After enabling the plugin, which went away when plugin was switched off.
So would need to address that first.

Any idea about the reported problems. In relation to the plugin?

Thx.
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Passing a Document Name to Printer Log

Postby Ernst » Fri Mar 15, 2019 10:03 am

Customer queries this again. Is it still possible to change the log message without reloading the report, and hopefully preventing all the errors they as mentioned in prior post?

Thanks..
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Passing a Document Name to Printer Log

Postby Mike.Sheen » Fri Mar 15, 2019 5:25 pm

Ernst wrote:Customer queries this again. Is it still possible to change the log message without reloading the report, and hopefully preventing all the errors they as mentioned in prior post?

Thanks..


Probably entirely possible, but In my testing when I wrote the plugin I didn't have the same issues as what your customer is reporting - although it's not really clear what the problem is that the customer is having that you've relayed to us here.

If given a clear set of steps to show a problem, I'll spend some time following those to reproduce the issue and then troubleshoot and fix the issue.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests