Subreport JiwaLibSelectNumberFromJiwa equivalent in Jiwa 7

Support for Crystal Reports within Jiwa.

Subreport JiwaLibSelectNumberFromJiwa equivalent in Jiwa 7

Postby swoodsdw » Wed Feb 17, 2021 5:12 pm

I have a Delivery Docket that uses a stored proc.
A subreport prints only the detail lines for parts that use expiry dates (using selection export record formula) on the last page and calculates how many days between delivery date and expiry date. The total number of cartons "cartoncount" is also printed. The SP writes the invoice total cartoncount on each line so I was able to put a formula field in the subreport report footer to display the cartoncount. This works fine unless there are no detail lines that use expiry dates.
In Jiwa 6 JiwaLibSelectNumberFromJiwa would return a field from the database. Is there anything similar in Jiwa 7 or other way to get the cartoncount.
Steve Wood
SWOOD financial solutions
Adelaide
swoodsdw
I'm new here
I'm new here
 
Posts: 8
Joined: Sun Mar 02, 2008 2:43 pm

Re: Subreport JiwaLibSelectNumberFromJiwa equivalent in Jiwa

Postby Scott.Pearce » Thu Feb 18, 2021 12:45 pm

We deal with this in other reports by returning a "DUMMY" row. Look in "usp_Jiwa_Invoices_Invoice" for an example of this - right at the bottom if no rows are going to be returned, we insert a bunch of blank values into the temp table before returning the data set. One of the fields (LineType) is given the value of 'DUMMY'. In the crystal report we suppress the detail line where the LineType = 'DUMMY', but we can still use values such as InvoiceNo from the dummy row elsewhere in the report (i.e. on the header). Rather than having a specific field like LineType, you could instead just place the value 'DUMMY' in the DetailsLineID field, and then check for that in the crystal report.

If your sub-report is linking in a table (such as SO_LineDetails), maybe you could create a view that UNIONS SO_LineDetails with a dummy row, then point your subreport to the view instead. Don't forget to suppress the dummy row in the details section of the sub-report!
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to Crystal Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron