Topic: How can I do the following reports? Posted: 27 Jul 2016 at 5:24am
Please refer to the attachment at, http://www.j2000.com.sg/wp-content/uploads/2016/07/report1.png
The users requested 2 kinds of report and I thought of using subreport to fulfill the request.
I have 3 tables in my database.
SalesInvoice is a one-to-many relationship to SalesInvoiceDetail table (linking field is ‘InvoiceId’ column in both tables).
SalesInvoiceDetail has a column named ‘article_size’ which is a one-to-many relationship to ArticleSize table (linking field is ‘SizeId’ column in both tables.
Basically the subreport is showing the different sizes (these sizes are not limited to S, M, L) and it varies to unlimited type of sizes.
I am not sure if I need to use a subreport though since I am aware that subreport affects performance.
For Report Format 1, the subreport simply displays the quantity for certain size type and it has no unit price.
For Report Format 2, the subreport has both the size type, quantity and a unit cost for each row. I need to get the total for each of its own subreport.
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 28 Jul 2016 at 4:17am
I am not sure how you have the main report formatted. But I think the quantity for a certain size would just be a running total. Again I think the second sub-report could be a running total. Another thought (depending of your SQL skills). You may be able create sub-queries to return the totals that you need.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum