Page 1 of 1

Does Using Store Procedure in PO Report work when emailing

PostPosted: Mon Feb 12, 2018 2:59 pm
by Clare
This may be related to viewtopic.php?f=24&t=746&p=2586&hilit=Purchase+order#p2586

We have modified the standard Purchase Order report, MNT40001 - Purchase Order.rpt, so that PO_Main points to a stored procedure. Not the table. (All other tables have been removed).

The report works fine when printing to screen, however, if we try to email the report from Jiwa (not the crystal report), it emails a blank report. (There is no modification to the email code here). FYI, we have checked with the standard MNT40001 - Purchase Order.rpt and printing and emailing work fine in the environment.

Question, is there something different in the emailing code that stopping the Purchase order emailing if a store procedure is used in the report?

Thanks

Re: Does Using Store Procedure in PO Report work when emaili  Topic is solved

PostPosted: Mon Feb 12, 2018 5:11 pm
by Scott.Pearce
There are a few workarounds possible for this. Let's try the quickest first. Try adding PO_Main into the report - link the stored procedure to the table (i.e. via OrderID).

The Jiwa PO emailing code expects that the report references PO_Main, but in your case it does not. Crystal treats everything as a data-source so it is not unreasonable to "link" a table to a stored procedure. Note though that we do this the other way around - we want to start with the table (po_main) and then link in the stored proc - this way the selection criteria limits the row-set before it calls the stored proc.

Re: Does Using Store Procedure in PO Report work when emaili

PostPosted: Thu Jan 24, 2019 1:06 pm
by Clare
Hi Just letting you know, in the end we had to create a plugin to get around this issue.

Thanks for your time in this matter.