Printing a document (check) through the Documents API
Posted: Tue Jul 05, 2022 9:53 pm
We've been printing checks via the Documents API, which has worked, but have now run into a peculiar issue.
The check template crystal report has been changed to display a "Approver and disburser cannot be the same person" message.
I have the crystal report and when I preview the report in Crystal Reports, the check displays correctly using the values I pass in through the Documents API. However, when I use the Documents API, I get the "Approver and disburser cannot be the same person" message. The Approver is blank, so is ProTrust passing in a blank USERID to the check template?
This is how I print a check using the Documents API:
The check template crystal report has been changed to display a "Approver and disburser cannot be the same person" message.
I have the crystal report and when I preview the report in Crystal Reports, the check displays correctly using the values I pass in through the Documents API. However, when I use the Documents API, I get the "Approver and disburser cannot be the same person" message. The Approver is blank, so is ProTrust passing in a blank USERID to the check template?
This is how I print a check using the Documents API:
Code: Select all
string docName = "DOC_check_template";
IDocumentInfo docInfo = documentManager.Documents.Where(t => t.Identifier.Name == docName).FirstOrDefault();
ITransaction transaction = transactionsManager.GetTransaction(transactionInfo);
IRendererFactory rendererFactory = selectServer.GetService<IRendererFactory>();
IRenderer renderer = rendererFactory.Create();
IRendering rendering = renderer.Render(docInfo, transaction, null);