1. You need to remove all doubles and use bigdecimal or joda money. If you don't know why, google it.
2. If you want to do adhoc reporting, consider replicating to bigquery and running from there. If you don't want to do that, queries in batches on backends is the way to go, but this kind of reporting is the datastores weakspot. On Thursday, 26 January 2017, Rajesh Gupta < [email protected]> wrote: > Hi, > > I have the following Entities (Shown in objectify style) > I want to do several reports for this data with different invoice date > ranges. > - Sales by customer > - Product Qty sold by product > - Product value by product > > The reports can be filtered with any Date range like 'Last Month', 'Last > Qtr', 'Year to date' or any custom date range. > > The no of invoices fetched can be from 100-10000, depending on the date > range. > > What is the good way to do such aggregate reports.? > > So far, we have used looping with hashmaps. But this style of reports > will increase and the data will also increase. I am looking for more > efficient data structures or schemas. > > @Entity > class SalesInvoice { > @Id Long id; > Key<Customer> customerKey; > > List<LineItem> lineItems > > double total; > Key<SalesPerson> salesPersonKey; > Date invoiceDate; > } > > @Embed > class LineItem { > Key<Product> productKey; > double qty; > double price; > double tax; > double totalPrice > } > > -- > Regards, > Rajesh > *www.VeersoftSolutions.com <http://www.VeersoftSolutions.com>* > *www.GainERP.com <https://www.gainerp.com>* > *Accounting/Inventory/Orders/Sales/Purchase on Google Cloud Platform and > Mobile* > > -- > You received this message because you are subscribed to the Google Groups > "objectify-appengine" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','objectify-appengine%[email protected]');> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CABezLV7J-52gp4BrAK_eMLb9YbZe1w4as%3DYCeih%2BS%3D88%3Dh%3DpKQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
