Hi Experts,
i'm facing a challenge to call the latest incoming payment records in my reports if the customer do the payment more than one in one invoices.
how i can only show the only lastest incoming payment record which close the entire invoices?
Below will be my query.
SELECT "OOCR"."OcrCode", "OOCR"."OcrName", "OINV"."DocNum", "INV1"."ItemCode", "OITM"."ItemName", "INV1"."OcrCode2", "INV1"."LineTotal", "INV1"."OcrCode", "INV1"."GPTtlBasPr", "OINV"."DocDate", "INV1"."U_SE2", "INV1"."U_SE2Costs", "INV1"."U_SE2Amount", "OINV"."DocStatus", "OINV"."DiscPrcnt", "OINV"."DocEntry", "ORCT"."DocEntry", "ORCT"."DocDate"
FROM (((("DATABSE"."dbo"."INV1" "INV1" INNER JOIN "ITS_LIVE_TEST"."dbo"."OITM" "OITM" ON ("INV1"."TreeType"="OITM"."TreeType") AND ("INV1"."ItemCode"="OITM"."ItemCode")) INNER JOIN "ITS_LIVE_TEST"."dbo"."OOCR" "OOCR" ON "INV1"."OcrCode"="OOCR"."OcrCode") INNER JOIN "ITS_LIVE_TEST"."dbo"."OINV" "OINV" ON "INV1"."DocEntry"="OINV"."DocEntry") INNER JOIN "ITS_LIVE_TEST"."dbo"."RCT2" "RCT2" ON "OINV"."DocEntry"="RCT2"."DocEntry") INNER JOIN "ITS_LIVE_TEST"."dbo"."ORCT" "ORCT" ON "RCT2"."DocNum"="ORCT"."DocNum"
WHERE ("ORCT"."DocDate">={ts 'Date'} AND "ORCT"."DocDate"<{ts '2015-01-01 00:00:00'}) AND ("OOCR"."OcrCode"=N' ') AND ("OINV"."DocStatus"='C')
appreciate all the great help
Hi Raghavendra,
if follow the Dell's steps i'm just able to see the single line information under my reports detail section. which mean i cant see all the remain lines items.
Under my detail report section, i have call all line detail of the individual invoices (INV1 table).
Maybe i have suppress the wrong section? or i need to apply any formula under the suppress field? it will possible that i suppress on the PayNo fields, just list the biggest PayNo transaction number?
Thanks.
The easiest way to do this in the report itself (instead of in the query) is to do something like the following:
1. Add a descending sort on the DocDate field. This will then sort the most recent date to the top inside the inner-most group.
2. Put the data in a group header section instead of details. Suppress the details section.
This doesn't work well if you have to do any summaries (sum, count, etc) using the detail data, but there are ways around that too.
-Dell
Add a comment