Single report to multiple printers

jsnavmibuso
Member Posts: 9
Hi ALl,
I have 5 machines with a 3rd part application installed which triggers a particular report from NAV server. My requirement is from whichever machine the report is triggered, print should be populated from the respective printer attached to it. Is it possible in NAV 2016
I have 5 machines with a 3rd part application installed which triggers a particular report from NAV server. My requirement is from whichever machine the report is triggered, print should be populated from the respective printer attached to it. Is it possible in NAV 2016
0
Answers
-
I presume the third party app consumes a NAV webservice.
use something like the CreatePrintJob function below in the NAV webservice codeunit.
Configure the job queue to run, and you'll be able to send to different printers bij executing
the CreatePrintJob function through your webservice. The pUserId should be different for each machine. The users have to be valid users in NAV, and the report should be configured to print on a specific printer for that user using the printer settings in NAV.
pRunInUserSession := true; !!
CreatePrintJob(pRecRef : RecordRef;pUserId : Code[50];pObjectID : Integer;pCategory : Code[10];pNotify : Boolean;pRunInUserSession : Boolean)
//3=report,5=CU
JobQueueEntryLRec.ID := CREATEGUID;
JobQueueEntryLRec."User ID" := pUserId;
JobQueueEntryLRec."Timeout (sec.)" := 7200;
JobQueueEntryLRec."Object Type to Run" := 3;
JobQueueEntryLRec."Object ID to Run" := pObjectID;
ObjectTable.SETRANGE(Type,JobQueueEntryLRec."Object Type to Run");
ObjectTable.SETRANGE(ID,JobQueueEntryLRec."Object ID to Run");
IF NOT ObjectTable.FINDFIRST THEN
CLEAR(ObjectTable);
JobQueueEntryLRec."Record ID to Process" := pRecRef.RECORDID;
JobQueueEntryLRec.Description := COPYSTR(STRSUBSTNO('%1 %2 %3',ObjectTable.Type,ObjectTable.ID,ObjectTable.Name),1,MAXSTRLEN(JobQueueEntryLRec.Description));
JobQueueEntryLRec."Job Queue Category Code" := pCategory;
JobQueueEntryLRec."Notify On Success" := pNotify;
JobQueueEntryLRec."Maximum No. of Attempts to Run" := 3;
JobQueueEntryLRec."Run in User Session" := pRunInUserSession;
CODEUNIT.RUN(CODEUNIT::"Job Queue - Enqueue",JobQueueEntryLRec);0 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions