Publishing a report - Is it possible?

Discussions related to custom development with Select.
Post Reply
Raheel
Posts: 4
Joined: Mon Sep 10, 2012 1:51 pm

Publishing a report - Is it possible?

Post by Raheel »

I can access document manager object by using

SoftPro.Documents.Client.IDocumentManager docManager = (SoftPro.Documents.Client.IDocumentManager)sps.GetService(typeof(SoftPro.Documents.Client.IDocumentManager));

but could not relate my existing order with manager and report object. In short what I am trying to accomplish using SoftPro APIs is to create a new order, track an existing order, select an available ReadyDocs and publish it.

Thanks
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Publishing a report - Is it possible?

Post by John Morris »

You CAN attach files to the order using the Attachments property on IOrder.

You CANNOT render documents/reports programmatically.
John Morris
Sr. Software Architect
SoftPro
dfrandsen
Posts: 15
Joined: Tue Mar 03, 2009 11:33 am

Re: Publishing a report - Is it possible?

Post by dfrandsen »

Are there any examples anywhere that show how to add an attachment to an order? The SDK documentation has nothing, and I've found nothing in the forums aside from this thread. We used to be able to do something like this:

Code: Select all

IDocumentImage docSP = order.DocumentImage.CreateNew();
docSP.Trustee = order.CurrentUser;
docSP.OriginalLocation = new Uri(doc.FilePath);
docSP.Description = docName;
docSP.DocumentImageTypeID = SoftPro.OrderTracking.Client.DocumentImageType.Attached;
docSP.FileType = "PDF";
docSP.SubmittedDate = localDate;
How can we do something similar in Cameron?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Publishing a report - Is it possible?

Post by John Morris »

Those interfaces you're using are obsolete in v3.0. Use the IAttachmentFolder, IAttachmentFile and IAttachmentItem interfaces instead. They are located in the SoftPro.OrderTracking.Client assembly.

Code: Select all

IOrderStore os = sps.GetService<IOrderStore>();
IOrder order = GetMyOrder();

//add a new file
IAttachmentFile file = order.Attachments.NewFile("C:\\somefile.pdf");

//save the order to commit the attachment changes - attachments are part of the order
os.ApplyChanges(order);
John Morris
Sr. Software Architect
SoftPro
Post Reply