This is another but it too has the same issue on doubling refunds as part of the discount total value.
If anyone want to amend this and correct the logic in the xml please feel free . so no release without prior communication in relation to this report or any part therof. if changes are made please send me the updated version .
this is for tracking discounts done by cashier , it will show the discount percentage.
if someone can exclude refunds with an option or dropbox at the beginning that would be great , my skills are still new .
//--- Report Summary --- //
Begin ReportSummary
ReportType = reporttypeSales
ReportTitle = "Discounts by Cashier"
PageOrientation = pageorientationPortrait
ShowDateTimePicker = True
OutLineMode = True
Groups = 1
GroupDescription = ""
DisplayLogo = True
LogoFileName = "MyLogo.Bmp"
ProcedureCall = ""
TablesQueried = "FROM [Transaction] LEFT JOIN TransactionEntry ON [Transaction].TransactionNumber = TransactionEntry.TransactionNumber LEFT JOIN Cashier ON [Transaction].CashierID = Cashier.ID"
SelCriteria = ""
GroupBy = "TransactionEntry.ID,Cashier.Name"
SortOrder = ""
End ReportSummary
//--- Title Rows ---//
Begin TitleRow
Text = "<Store Name>"
Font = "Arial"
FontBold = True
FontSize = 16
Color = "Blue"
End TitleRow
Begin TitleRow
Text = "<Report Title>"
Font = "Arial"
FontBold = True
FontSize = 12
Color = "Black"
End TitleRow
Begin TitleRow
Text = "Generated On <Report Date>"
Font = "Arial"
FontBold = True
FontSize = 10
Color = "Black"
End TitleRow
//--- Filters ---//
Begin Filter
FieldName = "[Transaction].Time"
FilterOp = reportfilteropBetween
FilterLoLim = "01/05/2008"
FilterHilim = "20/05/2008"
End Filter
//--- Columns ---//
Begin Column
FieldName = "Cashier.Name"
DrillDownFieldName = "Cashier.Name"
DrillDownReportName = ""
Title = "Name"
VBDataType = vbString
Formula = "MAX(Cashier.Name)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 3000
GroupMethod = groupmethodMax
ColFormat = ""
End Column
Begin Column
FieldName = "[Transaction].TransactionNumber"
DrillDownFieldName = "[Transaction].TransactionNumber"
DrillDownReportName = ""
Title = "Transaction Number"
VBDataType = vbString
Formula = "MAX([Transaction].TransactionNumber)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 2000
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "[Transaction].Time"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Date"
VBDataType = vbDate
Formula = "MAX([Transaction].Time)"
ColHidden = True
ColNotDisplayable = False
FilterDisabled = False
ColWidth = 900
GroupMethod = groupmethodNone
ColFormat = ""
End Column
Begin Column
FieldName = "TransactionEntry.FullPrice"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Full Price"
VBDataType = vbCurrency
Formula = "MAX(TransactionEntry.FullPrice)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = True
ColWidth = 2000
GroupMethod = groupmethodSUM
ColFormat = ""
End Column
Begin Column
FieldName = "TransactionEntry.Price"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = " Discounted Price"
VBDataType = vbCurrency
Formula = "MAX(TransactionEntry.Price)"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = True
ColWidth = 2000
GroupMethod = groupmethodSUM
ColFormat = ""
End Column
Begin Column
FieldName = "Percentage"
DrillDownFieldName = ""
DrillDownReportName = ""
Title = "Discount %"
VBDataType = vbDouble
Formula = "CASE WHEN MAX(FullPrice) > 0 THEN ROUND((MAX(FullPrice)-MAX(Price))/MAX(FullPrice),2)*100 ELSE 0 END"
ColHidden = False
ColNotDisplayable = False
FilterDisabled = True
ColWidth = 1000
GroupMethod = groupmethodNone
ColFormat = "#.##"
End Colunm