Enable Print To Screen Option When Printing a Sales Order -  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Enable Print To Screen Option When Printing a Sales Order -

Postby Ernst » Wed Mar 28, 2018 1:09 pm

Hi This is a great Plugin developed by Scott. And has been downloaded 111 times. But can anybody help getting it working in 7.01.

Attached is my attempt, but the print button remain Read Only. I think I need to move the manager to a common spot.
Attachments
Plugin Enable Print To Screen Option When Printing a Sales Order.xml
(37.13 KiB) Downloaded 99 times
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Enable Print To Screen Option When Printing a Sales Orde

Postby Mike.Sheen » Thu Mar 29, 2018 4:22 pm

Hi Ernst,

I've updated the plugin and attached it to the topic in the samples forum.

Mike
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: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Enable Print To Screen Option When Printing a Sales Orde

Postby Ernst » Fri Mar 30, 2018 5:23 pm

Brilliant thanks Mike. I'll see how you did it and hopefully learn from that... :)) :D
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Enable Print To Screen Option When Printing a Sales Orde

Postby Ernst » Tue Apr 03, 2018 2:15 pm

Hiya Mike,

Have tried the new plugin you set up for us on 7.01 demo system, and the customer system.

On both I get an Object Reference not set to an instance of an Object. Module printReportSelectionDialog_formClosing.

This is when you click any button on the print box. Can you check that for us please.

Thanks
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Enable Print To Screen Option When Printing a Sales Orde

Postby Ernst » Tue Apr 03, 2018 2:31 pm

PS I just commented out this whole section, and it seems to work fine..


public void printReportSelectionDialog_FormClosing(System.Object eventSender, System.Windows.Forms.FormClosingEventArgs eventArgs)
{
if(eventArgs.Cancel == false)
{
var manager = new JiwaFinancials.Jiwa.JiwaApplication.Manager();
// JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.PrintReportSelection printReportSelectionDialog = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.PrintReportSelection)eventSender;
// manager.Staff.UserSettings.InvoicingPrintToScreen = printReportSelectionDialog.PrintToScreen;
// JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Staff.UserSettings.InvoicingPrintToScreen = printReportSelectionDialog.PrintToScreen;
// object[] startParameters = (object[])printReportSelectionDialog.StartParameters;
// JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.BaseSalesOrderEntryForm salesOrderForm = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.BaseSalesOrderEntryForm)startParameters[1];
// JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder salesOrderObject = (JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder) salesOrderForm.SalesOrder;
// salesOrderObject.SystemSettings.PrintToScreen = printReportSelectionDialog.PrintToScreen;
// printReportSelectionDialog.FormClosing -= printReportSelectionDialog_FormClosing;
}

}

}
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Enable Print To Screen Option When Printing a Sales Orde  Topic is solved

Postby Mike.Sheen » Wed Apr 18, 2018 12:07 pm

Hi Ernst,

I've updated the plugin to address that issue.

Mike
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: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Enable Print To Screen Option When Printing a Sales Orde

Postby Ernst » Mon Jul 06, 2020 3:23 pm

With that plugin print to screen. Ive been trying to change the Default Print type, in the print dialog box, to the second option.... Report Type. By default when the dialog box opens, instead of the default "Single report"

Is it possible to do that. Ive tried a lot of options, but cannot get it to work.
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron