IPrintJobItem Properties

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Mark McKenna

Re: IPrintJobItem Properties

Post by Mark McKenna »

It is the unique identifier of the document in the system (technically, it's the primary key of the associated DocReport record in the database). For example, the HUD-1 Page 1 Legal document will have one identifier, and the Order Summary document will have another. A given document can be generated multiple times within a single batch, and each print job item representing that document would have the same DocReportId value.

Say the HUD-1 Page 1 Legal document has an ID of 6D625FF2-0785-4dab-AC8A-9613E32D425E. Further, assume the Select order you are printing from contains 2 HUDs, with IDs 4145581B-2EEB-4534-8F09-D1327D62F38D and DAEE0C8A-5176-41b7-8EAF-7B41D32880A2. If you go to the Documents screen and select/print just that document, you could end up rendering two documents - one for each HUD. Your print job would look like this (only select properties shown, for brevity):

IPrintJobItem 1:
DocReportId: 6D625FF2-0785-4dab-AC8A-9613E32D425E
PrimaryContextId: 4145581B-2EEB-4534-8F09-D1327D62F38D
...

IPrintJobItem 2:
DocReportId: 6D625FF2-0785-4dab-AC8A-9613E32D425E
PrimaryContextId: DAEE0C8A-5176-41b7-8EAF-7B41D32880A2
...

I think DocReportId gives you what you want, assuming you can make the correlation to whatever you are trying to accomplish. Again, remember that once collation/merging occurs (it's just another pipeline handler that runs pretty early in the sequence), there is a good chance that the print job items inside the IPrintJob.Items collection will no longer provide any DocReportId info because that item may now represent more than one source document (due to merging). Conversely, IPrintJob.OriginalItems will always retain the pre-merge state of the print job.
Shevy
Posts: 48
Joined: Tue Dec 23, 2008 12:21 pm

Re: IPrintJobItem Properties

Post by Shevy »

Thank you for sending the private message, I would have missed this response.
It sounds like I may be able to use this id, Is there a table in the database, that stores each document and its guid, so that I can know beforehand which ID represents which document?
Thanks for all your help with this.
Mark McKenna

Re: IPrintJobItem Properties

Post by Mark McKenna »

dbo.DocReport

Note that we generally advise against direct database access, but there is no API currently available that exposes the documents in the system (something we are working on).
Shevy
Posts: 48
Joined: Tue Dec 23, 2008 12:21 pm

Re: IPrintJobItem Properties

Post by Shevy »

It looks like this should work. I got busy with some other things in the interim so I will let you know when I fully test and it is working.
Thanks again for your help!
Post Reply