Grouping
Bart De Cattelle
Dear all,I have an Invoice layout and in that invoice layout i want to print the lines grouped by basedocnum and ordered by basedocdate.
An example : i have an invoice based on four deliveries :
delivery 100 (docdate 15032007)
delivery 102 (docdate 08032007)
delivery 103 (docdate 17032007)
delivery 104 (docdate 12022007)
When i print the invoice, i want to see first the lines of delivery 104, then delivery 102, then 100 and finally 103.
The problem is that you can not group by BaseDocNum + BaseDocDate because BaseDocDate is not available in your datasources.
Is there a solution for this problem?
Kind regards
Bart
Philipp Knecht
Hi BartYes you can extract the Row - Query from the UseData xml - File (...SWA_LD/0095/datadefs/marketingservice.xml) and add the following Line to the query (at first place):
/* @@Overwrite @@Name=[Row] */
And save it as query in SAP B1
(described in Chapter 10.2 on Page 41 in the Documentation)
hth
Bart De Cattelle
Dear all,In this specific example, how will my query looks like in SAP Business One?
Because i do not manage to adjust my query so that my rows are grouped by basedocnum and sorted by basedocDate. They are only grouped by basedocnum, not sorted by basedocDate. Do i need to make an inner join with the basedoctable in the rows query so that the basedocdate will be available in the datasources or do i need to adjust another query (baserowdetails, ...) ?
Kind regards,
Bart
Philipp Knecht
Hi bartYou just can extend the extracted query with an left outer join to get the DocDates and sort this query like you want.
hth
0
Please sign in to leave a comment.
Comments
0 comments