Page 1 of 1

Service Manager printing via plugin

PostPosted: Tue Sep 06, 2016 10:20 am
by DannyC
Hi,

I am wanting to develop a plugin to print when the job status changes to closed. I have done similar for Sales Orders so I am looking for similar methods in the Service Manager module.
I can't find getCandidateReportsToPrint so I can locate the correct form I need to use, and in addition I can't find the Print method either.
I have looked through both the Job and the Task but I can't find anything which would allow me to somehow automate printing (or emailing if possible too).
I use VB .Net.

Is there something different I need to be looking at?

Cheers

Danny

Re: Service Manager printing via plugin

PostPosted: Thu Nov 03, 2016 6:52 am
by SBarnes
Hi Danny,

Have a look at the ReportDefinitionCollection on the form, this will contain the reports that have be defined for the form, then call PrintRecord on the form handing through the report definition you want to print.

Re: Service Manager printing via plugin  Topic is solved

PostPosted: Sun Nov 13, 2016 12:22 pm
by Mike.Sheen
Hi Danny,

As Stuart mentioned above, the ReportDefinitionCollection property of the form has the list of defined reports for that form. The Service Manager business logic doesn't handle printing like sales orders does, it's driven purely from the form.

The form has a method you can invoke to print a particular report:

Code: Select all
Public Overrides Sub PrintRecord(ReportDefinition As JiwaApplication.PrintGroup.FormReports.ReportDefinition)


So, you can just invoke that.

Mike