this report can show sum(quantity) by store,transaction,salesrep
//--- Report Summary --- //
Begin ReportSummary ReportType = reporttypeSales ReportTitle = "SR Category Report" PageOrientation = pageorientationLandscape WordWrap = False ShowDateTimePicker = False OutLineMode = True Groups = 0 GroupDescription = "" DisplayLogo = True LogoFileName = "MyLogo.bmp" ProcedureCall = "" PreQuery1 = "" PreQuery2 = "" TablesQueried FROM TransactionEntry INNER JOIN [Transaction] WITH(NOLOCK) ON TransactionEntry.TransactionNumber = [Transaction].TransactionNumber AND TransactionEntry.StoreID = [Transaction].StoreID LEFT JOIN SalesRep WITH(NOLOCK) ON TransactionEntry.SalesRepID = SalesRep.ID AND TransactionEntry.StoreID = SalesRep.StoreID LEFT JOIN Store WITH(NOLOCK) ON TransactionEntry.StoreID = Store.ID LEFT JOIN Item WITH(NOLOCK) on Itemid=Item.id LEFT JOIN Department WITH(NOLOCK) on departmentidÞpartment.id LEFT JOIN Category WITH(NOLOCK) on categoryidÊtegory.id
SelCriteria = "" GroupBy = "SalesRep.Name, Store.id,[Transaction].TransactionNumber" SortOrder = "Store.ID,Min(SalesRep.Number)" End ReportSummary
//--- Title Rows ---//
Begin TitleRow Text = "" Font = "Arial" FontBold = True FontSize = 16 Color = "Blue" End TitleRow
Begin TitleRow Text = "" Font = "Arial" FontBold = True FontSize = 12 Color = "Black" End TitleRow
Begin TitleRow Text = "Generated On " Font = "Arial" FontBold = True FontSize = 10 Color = "Black" End TitleRow
//--- Filters ---//
Begin Filter FieldName = "[Transaction].Time" FilterOp = reportfilteropBetween FilterLoLim FilterHilim FilterNegated = False FilterConnector = reportfilterbooleanconAND End Filter
//--- Columns ---//
Begin Column FieldName = "Store_ID" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Store_ID" VBDataType = vbLong Formula = "Min(Store.ID)" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 870 GroupMethod = groupmethodNone ColFormat = "" End Column
Begin Column FieldName = "[Transaction].TransactionNumber" DrillDownFieldName = "[Transaction].TransactionNumber" DrillDownReportName = "" StoreIDFieldName = "" Title = "Transaction" VBDataType = vbLong Formula = "" ColHidden = True ColNotDisplayable = False FilterDisabled = False ColWidth = 1245 GroupMethod = groupmethodNone ColFormat = "" End Column
Begin Column FieldName = "SalesRepName" DrillDownFieldName = "SalesRep.Name" DrillDownReportName = "" StoreIDFieldName = "" Title = "Name" VBDataType = vbString Formula = "MAX(SalesRep.Name)" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 1860 GroupMethod = groupmethodNone ColFormat = "" End Column
Begin Column FieldName = "REP_ID" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "REP_ID" VBDataType = vbLong Formula = "Min(SalesRep.Number)" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 870 GroupMethod = groupmethodNone ColFormat = "" End Column
Begin Column FieldName = "QtySold" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Items Sold" VBDataType = vbInteger Formula = "SUM(TransactionEntry.Quantity)" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 1215 GroupMethod = groupmethodSum ColFormat = "#" End Column
Begin Column FieldName = "Department.Name" DrillDownFieldName = "Department.Name" DrillDownReportName = "" StoreIDFieldName = "" Title = "Department" VBDataType = vbString Formula = "" ColHidden = True ColNotDisplayable = True FilterDisabled = False ColWidth = 2205 GroupMethod = groupmethodNone ColFormat = "" ColAlignment = flexAlignLeftCenter End Column
Begin Column FieldName = "Category.Name" DrillDownFieldName = "Category.Name" DrillDownReportName = "" StoreIDFieldName = "" Title = "Category" VBDataType = vbString Formula = "" ColHidden = True ColNotDisplayable = True FilterDisabled = False ColWidth = 1515 GroupMethod = groupmethodNone ColFormat = "" ColAlignment = flexAlignLeftCenter End Column
Begin Column FieldName = "Sales" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Sales" VBDataType = vbCurrency Formula = "SUM(TransactionEntry.Price * TransactionEntry.Quantity)" ColHidden = True ColNotDisplayable = False FilterDisabled = False ColWidth = 1260 GroupMethod = groupmethodSum ColFormat = "" End Column
Begin Column FieldName = "Commission" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Commission" VBDataType = vbCurrency Formula = "SUM(TransactionEntry.Commission)" ColHidden = True ColNotDisplayable = False FilterDisabled = False ColWidth = 1545 GroupMethod = groupmethodSum ColFormat = "" End Column
Begin Column FieldName = "[TransactionEntry].Cost" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Inventory Cost" VBDataType = vbCurrency Formula = "SUM(TransactionEntry.Cost * TransactionEntry.Quantity)" ColHidden = True ColNotDisplayable = False FilterDisabled = False ColWidth = 1635 GroupMethod = groupmethodSum ColFormat = "" End Column
Begin Column FieldName = "Profit" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Profit" VBDataType = vbCurrency Formula = "SUM((TransactionEntry.Price - TransactionEntry.Cost) * TransactionEntry.Quantity)" ColHidden = True ColNotDisplayable = False FilterDisabled = False ColWidth = 1635 GroupMethod = groupmethodSum ColFormat = "" End Column
Begin Column FieldName = "[Transaction].Time" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "Date Sold" VBDataType = vbDate Formula = "" ColHidden = True ColNotDisplayable = True FilterDisabled = False ColWidth = 1035 GroupMethod = groupmethodNone ColFormat = "" End Column
"Scott S" wrote: