Manipulating "Sales Order Print Report" Dialog  Topic is solved

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

Manipulating "Sales Order Print Report" Dialog

Postby marcosomizu » Mon Sep 21, 2015 2:14 pm

Hi,

When I click on "Print" button in Sales Ordem Form, opens a "Sales Order Print Report", where I can select which Report I want to print, Report Type and so on.

I want to manipulate one of the components of this PrintReportSelection form (actually, I just want to disable the "Print to Screen" checkbox, so the user can change this option on this dialog). How do I do this?

Cheers,
Marcos Omizu
marcosomizu
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Sep 07, 2015 12:01 pm
Topics Solved: 1

Re: Manipulating "Sales Order Print Report" Dialog

Postby marcosomizu » Thu Sep 24, 2015 12:21 pm

Any ideas?
marcosomizu
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Sep 07, 2015 12:01 pm
Topics Solved: 1

Re: Manipulating "Sales Order Print Report" Dialog

Postby Scott.Pearce » Tue Oct 20, 2015 2:33 pm

marcosomizu wrote:actually, I just want to disable the "Print to Screen" checkbox


I thought this checkbox was always disabled already. Are you saying the checkbox is enabled for you?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Manipulating "Sales Order Print Report" Dialog

Postby marcosomizu » Wed Oct 21, 2015 12:29 pm

Sorry Scott, I wrote it wrong.

Yes, it is always disabled, but I want to enable it under one condition. Is that possible?
marcosomizu
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Sep 07, 2015 12:01 pm
Topics Solved: 1

Re: Manipulating "Sales Order Print Report" Dialog

Postby Scott.Pearce » Thu Oct 22, 2015 8:55 am

You could enable it, but it won't do anything without further work.

The Print To Screen checkbox is simply a read-only indicator as to whether the user is configured to print to screen or direct to printer. The setting that this checkbox indicates can be found at System -> Staff Configuration -> Staff Maintenance, on the User Settings tab, Invoicing section. In code, the setting is at SalesOrder.SystemSettings.PrintToScreen.

So, you could enable the checkbox, but you would also have to add a handler for CheckedChanged.

Before I start getting down-and-dirty with code, can you tell me which version of Jiwa you would be doing this for? (C# plugin support was only added in later versions, before that only VB .Net was possible).
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Manipulating "Sales Order Print Report" Dialog

Postby indikad » Fri Oct 23, 2015 4:04 pm

I have a similar question if someone can get me some help please?

in 6513 i have a code in SalesOrder FormPrintBefore tye follwoing code
Code: Select all
rtnPrintToScreen = false

this makes the print to screen checkBox unticked when the print window pops up for the first time.

However I cannot get this happening "properly" ( using the code below)
Code: Select all
salesOrder.SystemSettings.PrintToScreen  = False


The change displays only after the print window opens once and closed by hitting ok. ( only subsequent opens will have the change )
I need this to happen before this first time and obviously the event i am using is wrong.
what is the event I should use ?
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Manipulating "Sales Order Print Report" Dialog

Postby Scott.Pearce » Fri Oct 23, 2015 4:08 pm

Which event are you currently using?
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Manipulating "Sales Order Print Report" Dialog

Postby marcosomizu » Wed Oct 28, 2015 2:50 pm

Hi Scott,

The idea is to enable the checkbox so the user can have the choice to Print to Screen (or not) in this form (without having to need to go to Staff Configuration).

For example:

[While in Sales Order Print Report Form]
Is the "Print to Screen" checkbox checked? Then set the Staff Configuration property to True and print to screen. Otherwise, set the Staff Configuration property to False and print directly to the printer.

My JIWA's version is 7.0.129, and the code that I am using is VB.net
marcosomizu
Occasional Contributor
Occasional Contributor
 
Posts: 23
Joined: Mon Sep 07, 2015 12:01 pm
Topics Solved: 1

Re: Manipulating "Sales Order Print Report" Dialog

Postby indikad » Fri Oct 30, 2015 1:58 pm

Scott.Pearce wrote:Which event are you currently using?


i am using
Code: Select all
SalesOrdForm.SalesOrder.Printing

event
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Manipulating "Sales Order Print Report" Dialog

Postby Scott.Pearce » Fri Nov 13, 2015 4:04 pm

I've put together a plugin that allows the check-box to control the user's setting. I've also had to work around a little bug whereby the dialog was not keeping a local variable of who called it (which we need to know to preserve the print to screen setting).

I wrote it in 7.0.142.0 but tested it in 7.0.129.0.

You blokes owe me a beer.
Attachments
Plugin Enable Print To Screen Option When Printing a Sales Order.xml
(37.17 KiB) Downloaded 1299 times
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Next

Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests