Home Page link  

Top selling items report including non-selling items

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Top selling items report including non-selling items Gerd 09-09-2007
Posted by Gerd on September 9, 2007, 8:15 pm
Please log in for more thread options
: 7bit

In RMS Store Operations 2.0 I copied the top selling items report and
changed the table sequence to use the item table as my first table with a
left join on the transactionentry table (see attached report).
The idea was that if there is no transactionentry record the item record
would still show on the report. But this is not the case and i am trying to
figure out where my report is wrong.

I don't use a date filter (ultimately I want to), assuming that if no
transactionentry record exists the transaction date would be NULL.

Running the report only shows items with a transactionentry records. I
verified that with various SQL statements and some items that are active in
the items table are not on the report.

Further I would like to group the items by using the first 7 characters of
the item.itemlookup code. I think i figured that out by using Formula =
"substring(Item.ItemLookupCode,1,7)". It seems to work but I would want to
be sure that it also works with the non-selling items.

And last, because I group by the first 7 character of the itemlookup code I
would want to trim the last 4 characters of the item.description field.
Because the description can have different number of characters I can't use
a fixed length. I tried different formulas, like Formula =
"substring(Item.ItemLookupCode,1,datalength((item.description) -4))" and
different variations of it but I always end up getting syntax errors.

I would appreciate if somebody could check my report and point me into the
right directions.

Thanks

------=_NextPart_000_0025_01C7F304.FB853BA0
Content-Type: application/octet-stream;
        name="Custom - Top Items Report.qrp"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="Custom - Top Items Report.qrp"

//--- Report Summary --- //

Begin ReportSummary
ReportType =3D reporttypeSales
ReportTitle =3D "Top Items Report"
PageOrientation =3D pageorientationPortrait
OutLineMode =3D True
Groups =3D 0
GroupDescription =3D ""
DisplayLogo =3D False
LogoFileName =3D "MyLogo.bmp"
ProcedureCall =3D ""
TablesQueried =3D <BEGIN>
FROM Item WITH(NOLOCK)
LEFT JOIN TransactionEntry WITH(NOLOCK) On Item.ID =3D =
TransactionEntry.ItemID=20
INNER JOIN [Transaction] WITH(NOLOCK) ON =
TransactionEntry.TransactionNumber =3D [Transaction].TransactionNumber=20
LEFT JOIN Department WITH(NOLOCK) ON Item.DepartmentID =3D =
Department.ID=20
LEFT JOIN Category WITH(NOLOCK) ON Item.CategoryID =3D =
Category.ID=20
<END>
SelCriteria =3D ""
GroupBy =3D "Department.Name,Category.Name,Item.ItemLookupCode"
SortOrder =3D "Sales DESC"
End ReportSummary


//--- Title Rows ---//

Begin TitleRow
Text =3D "<Store Name>"
Font =3D "Arial"
FontBold =3D True
FontSize =3D 16
Color =3D "Blue"
End TitleRow

Begin TitleRow
Text =3D "<Report Title>"
Font =3D "Arial"
FontBold =3D True
FontSize =3D 12
Color =3D "Black"
End TitleRow

Begin TitleRow
Text =3D "Generated On <Report Date>"
Font =3D "Arial"
FontBold =3D True
FontSize =3D 10
Color =3D "Black"
End TitleRow


//--- Filters ---//

Begin Filter
FieldName =3D "Department.Name"
FilterOp =3D reportfilteropEqual
FilterLoLim =3D "Loose Tea"
FilterHilim =3D "Loose Tea"
FilterNegated =3D False
FilterConnector =3D reportfilterbooleanconAND
End Filter

Begin Filter
FieldName =3D "[Transaction].Time"
FilterOp =3D reportfilteropBetween
FilterLoLim =3D "<YearStart>"
FilterHilim =3D "<Today>"
End Filter


//--- Columns ---//

Begin Column
FieldName =3D "Department.Name"
DrillDownFieldName =3D "Department.Name"
DrillDownReportName =3D ""
Title =3D "Department"
VBDataType =3D vbString
Formula =3D ""
ColHidden =3D False
ColNotDisplayable =3D False
FilterDisabled =3D False
ColWidth =3D 1500
GroupMethod =3D groupmethodNone
ColFormat =3D ""
ColAlignment =3D flexAlignLeftCenter
End Column

Begin Column
FieldName =3D "Category.Name"
DrillDownFieldName =3D "Category.Name"
DrillDownReportName =3D ""
Title =3D "Category"
VBDataType =3D vbString
Formula =3D ""
ColHidden =3D False
ColNotDisplayable =3D False
FilterDisabled =3D False
ColWidth =3D 1500
GroupMethod =3D groupmethodNone
ColFormat =3D ""
ColAlignment =3D flexAlignLeftCenter
End Column

Begin Column
FieldName =3D "ItemLookupCode"
DrillDownFieldName =3D "Item.ItemLookupCode"
DrillDownReportName =3D ""
Title =3D "Item Code"
VBDataType =3D vbString
Formula =3D "substring(Item.ItemLookupCode,1,7)"
ColHidden =3D False
ColNotDisplayable =3D False
FilterDisabled =3D False
ColWidth =3D 1400
GroupMethod =3D groupmethodNone
ColFormat =3D ""
End Column

Begin Column
FieldName =3D "ItemDescription"
DrillDownFieldName =3D ""
DrillDownReportName =3D ""
Title =3D "Description"
VBDataType =3D vbString
Formula =3D "MAX(Item.Description)"
ColHidden =3D False
ColNotDisplayable =3D False
FilterDisabled =3D False
ColWidth =3D 2835
GroupMethod =3D groupmethodNone
ColFormat =3D ""
End Column

Begin Column
FieldName =3D "[Transaction].Time"
DrillDownFieldName =3D ""
DrillDownReportName =3D ""
Title =3D "Date Sold"
VBDataType =3D vbDate
Formula =3D ""
ColHidden =3D True
ColNotDisplayable =3D True
FilterDisabled =3D False
ColWidth =3D 1035
GroupMethod =3D groupmethodNone
ColFormat =3D ""
End Column

Begin Column
FieldName =3D "QtySold"
DrillDownFieldName =3D ""
DrillDownReportName =3D ""
Title =3D "Qty Sold"
VBDataType =3D vbDouble
Formula =3D "SUM(TransactionEntry.Quantity)"
ColHidden =3D False
ColNotDisplayable =3D False
FilterDisabled =3D False
ColWidth =3D 1200
GroupMethod =3D groupmethodSum
ColFormat =3D "#.##"
End Column

Begin Column
FieldName =3D "Sales"
DrillDownFieldName =3D ""
DrillDownReportName =3D ""
Title =3D "Sales"
VBDataType =3D vbCurrency
Formula =3D "SUM(TransactionEntry.Price * TransactionEntry.Quantity)"
ColHidden =3D False
ColNotDisplayable =3D False
FilterDisabled =3D False
ColWidth =3D 1400
GroupMethod =3D groupmethodSum
ColFormat =3D ""
End Column


------=
Posted by Akber Alwani on September 10, 2007, 1:14 am
Please log in for more thread options
Hi Gerd, I am not sure but I already last 2 days given the solution what you
said regarding the trasnaction about bringing the items on sale:

I know that you use the LEFT function and still only data for the
transaction is coming use the below cluase for Transaction and
TransactionEntry tables also Not inner but LEFT join too for these tables:
LEFT JOIN TransactionEntry WITH(NOLOCK) ON TransactionEntry.ItemID = Item.ID
LEFT JOIN [Transaction] WITH(NOLOCK) ON TransactionEntry.TransactionNumber =
[Transaction].TransactionNumber

Regarding grouping it is okay you can use the LEFT function also and make
sure to group by substring or LEFT function same way as you are presenting
the data.

Regarding the Description you have given wrong formula, here is correct
formula:
substring(Item.Description,1,datalength(item.description) -4)

you specified substring(item.itemlookupcode and then in the data length you
specify the description which I belive you did by mistake.

If things works please rate.

"Gerd" wrote:

> In RMS Store Operations 2.0 I copied the top selling items report and
> changed the table sequence to use the item table as my first table with a
> left join on the transactionentry table (see attached report).
> The idea was that if there is no transactionentry record the item record
> would still show on the report. But this is not the case and i am trying to
> figure out where my report is wrong.
>
> I don't use a date filter (ultimately I want to), assuming that if no
> transactionentry record exists the transaction date would be NULL.
>
> Running the report only shows items with a transactionentry records. I
> verified that with various SQL statements and some items that are active in
> the items table are not on the report.
>
> Further I would like to group the items by using the first 7 characters of
> the item.itemlookup code. I think i figured that out by using Formula =
> "substring(Item.ItemLookupCode,1,7)". It seems to work but I would want to
> be sure that it also works with the non-selling items.
>
> And last, because I group by the first 7 character of the itemlookup code I
> would want to trim the last 4 characters of the item.description field.
> Because the description can have different number of characters I can't use
> a fixed length. I tried different formulas, like Formula =
> "substring(Item.ItemLookupCode,1,datalength((item.description) -4))" and
> different variations of it but I always end up getting syntax errors.
>
> I would appreciate if somebody could check my report and point me into the
> right directions.
>
> Thanks
>

Posted by Gerd on September 11, 2007, 4:23 pm
Please log in for more thread options
Thanks for your suggestion, Akber. Without date selection I now see all my
products, including the ones that never sold. However, I still have 3
issues:

1) the description field does not "chop off" the last 4 characters, the
complete description is still displayed. i use the following formula
Formula =
"MAX(substring(Item.Description,1,datalength(item.Description) -4))"
2) the grouping by the first 7 characters of item.itemlookupcode works if i
have transactionentry record. for all not-sold items the report shows me the
item number (first 7 character) for each item in the item table
i tried it with having the item.itemlookupcode in the Group By field and
with ItemLookupCode, which is the field name I assigned to the grouping of
the itemlookupcode.
3) i still would like to use some date selection if possible. if i enter a
date range i only get records with a transactionentry record (makes sense)
but for all the ones without a transaction record is there a way to set the
date selection to NULL or 0, or whatever the SQL statement would need? I
thought about a filter like
Begin Filter
FieldName = "Department.Name"
FilterOp = reportfilteropEqual
FilterLoLim = "Loose Tea"
FilterHilim = "Loose Tea"
FilterNegated = False
FilterConnector = reportfilterbooleanconAND
End Filter

Begin Filter
FieldName = "[Transaction].Time"
FilterOp = reportfilteropBetween
FilterLoLim = "<YearStart>"
FilterHilim = "<Today>"
FilterConnector = reportfilterbooleanconOR
End Filter

Begin Filter
FieldName = "[Transaction].Time"
FilterOp = reportfilteropBetween
FilterLoLim = "NULL"
FilterHilim = "NULL"
End Filter


> Hi Gerd, I am not sure but I already last 2 days given the solution what
> you
> said regarding the trasnaction about bringing the items on sale:
>
> I know that you use the LEFT function and still only data for the
> transaction is coming use the below cluase for Transaction and
> TransactionEntry tables also Not inner but LEFT join too for these tables:
> LEFT JOIN TransactionEntry WITH(NOLOCK) ON TransactionEntry.ItemID =
> Item.ID
> LEFT JOIN [Transaction] WITH(NOLOCK) ON TransactionEntry.TransactionNumber
> =
> [Transaction].TransactionNumber
>
> Regarding grouping it is okay you can use the LEFT function also and make
> sure to group by substring or LEFT function same way as you are presenting
> the data.
>
> Regarding the Description you have given wrong formula, here is correct
> formula:
> substring(Item.Description,1,datalength(item.description) -4)
>
> you specified substring(item.itemlookupcode and then in the data length
> you
> specify the description which I belive you did by mistake.
>
> If things works please rate.
>
> "Gerd" wrote:
>
>> In RMS Store Operations 2.0 I copied the top selling items report and
>> changed the table sequence to use the item table as my first table with a
>> left join on the transactionentry table (see attached report).
>> The idea was that if there is no transactionentry record the item record
>> would still show on the report. But this is not the case and i am trying
>> to
>> figure out where my report is wrong.
>>
>> I don't use a date filter (ultimately I want to), assuming that if no
>> transactionentry record exists the transaction date would be NULL.
>>
>> Running the report only shows items with a transactionentry records. I
>> verified that with various SQL statements and some items that are active
>> in
>> the items table are not on the report.
>>
>> Further I would like to group the items by using the first 7 characters
>> of
>> the item.itemlookup code. I think i figured that out by using Formula =
>> "substring(Item.ItemLookupCode,1,7)". It seems to work but I would want
>> to
>> be sure that it also works with the non-selling items.
>>
>> And last, because I group by the first 7 character of the itemlookup code
>> I
>> would want to trim the last 4 characters of the item.description field.
>> Because the description can have different number of characters I can't
>> use
>> a fixed length. I tried different formulas, like Formula =
>> "substring(Item.ItemLookupCode,1,datalength((item.description) -4))" and
>> different variations of it but I always end up getting syntax errors.
>>
>> I would appreciate if somebody could check my report and point me into
>> the
>> right directions.
>>
>> Thanks
>>


Posted by Akber Alwani on September 12, 2007, 12:38 am
Please log in for more thread options
HI Gred, its hard to do it from newsgroup send me email at alwani89
hotmail.com and also don't forget to rate once your problem solved by us.
because I wanted to become this year the MVP and only your guys rating will
make it.

"Gerd" wrote:

> Thanks for your suggestion, Akber. Without date selection I now see all my
> products, including the ones that never sold. However, I still have 3
> issues:
>
> 1) the description field does not "chop off" the last 4 characters, the
> complete description is still displayed. i use the following formula
> Formula =
> "MAX(substring(Item.Description,1,datalength(item.Description) -4))"
> 2) the grouping by the first 7 characters of item.itemlookupcode works if i
> have transactionentry record. for all not-sold items the report shows me the
> item number (first 7 character) for each item in the item table
> i tried it with having the item.itemlookupcode in the Group By field and
> with ItemLookupCode, which is the field name I assigned to the grouping of
> the itemlookupcode.
> 3) i still would like to use some date selection if possible. if i enter a
> date range i only get records with a transactionentry record (makes sense)
> but for all the ones without a transaction record is there a way to set the
> date selection to NULL or 0, or whatever the SQL statement would need? I
> thought about a filter like
> Begin Filter
> FieldName = "Department.Name"
> FilterOp = reportfilteropEqual
> FilterLoLim = "Loose Tea"
> FilterHilim = "Loose Tea"
> FilterNegated = False
> FilterConnector = reportfilterbooleanconAND
> End Filter
>
> Begin Filter
> FieldName = "[Transaction].Time"
> FilterOp = reportfilteropBetween
> FilterLoLim = "<YearStart>"
> FilterHilim = "<Today>"
> FilterConnector = reportfilterbooleanconOR
> End Filter
>
> Begin Filter
> FieldName = "[Transaction].Time"
> FilterOp = reportfilteropBetween
> FilterLoLim = "NULL"
> FilterHilim = "NULL"
> End Filter
>
>
> > Hi Gerd, I am not sure but I already last 2 days given the solution what
> > you
> > said regarding the trasnaction about bringing the items on sale:
> >
> > I know that you use the LEFT function and still only data for the
> > transaction is coming use the below cluase for Transaction and
> > TransactionEntry tables also Not inner but LEFT join too for these tables:
> > LEFT JOIN TransactionEntry WITH(NOLOCK) ON TransactionEntry.ItemID =
> > Item.ID
> > LEFT JOIN [Transaction] WITH(NOLOCK) ON TransactionEntry.TransactionNumber
> > =
> > [Transaction].TransactionNumber
> >
> > Regarding grouping it is okay you can use the LEFT function also and make
> > sure to group by substring or LEFT function same way as you are presenting
> > the data.
> >
> > Regarding the Description you have given wrong formula, here is correct
> > formula:
> > substring(Item.Description,1,datalength(item.description) -4)
> >
> > you specified substring(item.itemlookupcode and then in the data length
> > you
> > specify the description which I belive you did by mistake.
> >
> > If things works please rate.
> >
> > "Gerd" wrote:
> >
> >> In RMS Store Operations 2.0 I copied the top selling items report and
> >> changed the table sequence to use the item table as my first table with a
> >> left join on the transactionentry table (see attached report).
> >> The idea was that if there is no transactionentry record the item record
> >> would still show on the report. But this is not the case and i am trying
> >> to
> >> figure out where my report is wrong.
> >>
> >> I don't use a date filter (ultimately I want to), assuming that if no
> >> transactionentry record exists the transaction date would be NULL.
> >>
> >> Running the report only shows items with a transactionentry records. I
> >> verified that with various SQL statements and some items that are active
> >> in
> >> the items table are not on the report.
> >>
> >> Further I would like to group the items by using the first 7 characters
> >> of
> >> the item.itemlookup code. I think i figured that out by using Formula =
> >> "substring(Item.ItemLookupCode,1,7)". It seems to work but I would want
> >> to
> >> be sure that it also works with the non-selling items.
> >>
> >> And last, because I group by the first 7 character of the itemlookup code
> >> I
> >> would want to trim the last 4 characters of the item.description field.
> >> Because the description can have different number of characters I can't
> >> use
> >> a fixed length. I tried different formulas, like Formula =
> >> "substring(Item.ItemLookupCode,1,datalength((item.description) -4))" and
> >> different variations of it but I always end up getting syntax errors.
> >>
> >> I would appreciate if somebody could check my report and point me into
> >> the
> >> right directions.
> >>
> >> Thanks
> >>
>

Posted by Gerd on September 13, 2007, 2:00 pm
Please log in for more thread options
Hi Akber,

I have sent you a private e-mail with the latest version of the report and
some issues I still have with the report.

Could you confirm when you have received my e-mail?

Thanks

> HI Gred, its hard to do it from newsgroup send me email at alwani89
> hotmail.com and also don't forget to rate once your problem solved by us.
> because I wanted to become this year the MVP and only your guys rating
> will
> make it.
>
> "Gerd" wrote:
>
>> Thanks for your suggestion, Akber. Without date selection I now see all
>> my
>> products, including the ones that never sold. However, I still have 3
>> issues:
>>
>> 1) the description field does not "chop off" the last 4 characters, the
>> complete description is still displayed. i use the following formula
>> Formula =
>> "MAX(substring(Item.Description,1,datalength(item.Description) -4))"
>> 2) the grouping by the first 7 characters of item.itemlookupcode works if
>> i
>> have transactionentry record. for all not-sold items the report shows me
>> the
>> item number (first 7 character) for each item in the item table
>> i tried it with having the item.itemlookupcode in the Group By field and
>> with ItemLookupCode, which is the field name I assigned to the grouping
>> of
>> the itemlookupcode.
>> 3) i still would like to use some date selection if possible. if i enter
>> a
>> date range i only get records with a transactionentry record (makes
>> sense)
>> but for all the ones without a transaction record is there a way to set
>> the
>> date selection to NULL or 0, or whatever the SQL statement would need? I
>> thought about a filter like
>> Begin Filter
>> FieldName = "Department.Name"
>> FilterOp = reportfilteropEqual
>> FilterLoLim = "Loose Tea"
>> FilterHilim = "Loose Tea"
>> FilterNegated = False
>> FilterConnector = reportfilterbooleanconAND
>> End Filter
>>
>> Begin Filter
>> FieldName = "[Transaction].Time"
>> FilterOp = reportfilteropBetween
>> FilterLoLim = "<YearStart>"
>> FilterHilim = "<Today>"
>> FilterConnector = reportfilterbooleanconOR
>> End Filter
>>
>> Begin Filter
>> FieldName = "[Transaction].Time"
>> FilterOp = reportfilteropBetween
>> FilterLoLim = "NULL"
>> FilterHilim = "NULL"
>> End Filter
>>
>>
>> > Hi Gerd, I am not sure but I already last 2 days given the solution
>> > what
>> > you
>> > said regarding the trasnaction about bringing the items on sale:
>> >
>> > I know that you use the LEFT function and still only data for the
>> > transaction is coming use the below cluase for Transaction and
>> > TransactionEntry tables also Not inner but LEFT join too for these
>> > tables:
>> > LEFT JOIN TransactionEntry WITH(NOLOCK) ON TransactionEntry.ItemID =
>> > Item.ID
>> > LEFT JOIN [Transaction] WITH(NOLOCK) ON
>> > TransactionEntry.TransactionNumber
>> > =
>> > [Transaction].TransactionNumber
>> >
>> > Regarding grouping it is okay you can use the LEFT function also and
>> > make
>> > sure to group by substring or LEFT function same way as you are
>> > presenting
>> > the data.
>> >
>> > Regarding the Description you have given wrong formula, here is correct
>> > formula:
>> > substring(Item.Description,1,datalength(item.description) -4)
>> >
>> > you specified substring(item.itemlookupcode and then in the data length
>> > you
>> > specify the description which I belive you did by mistake.
>> >
>> > If things works please rate.
>> >
>> > "Gerd" wrote:
>> >
>> >> In RMS Store Operations 2.0 I copied the top selling items report and
>> >> changed the table sequence to use the item table as my first table
>> >> with a
>> >> left join on the transactionentry table (see attached report).
>> >> The idea was that if there is no transactionentry record the item
>> >> record
>> >> would still show on the report. But this is not the case and i am
>> >> trying
>> >> to
>> >> figure out where my report is wrong.
>> >>
>> >> I don't use a date filter (ultimately I want to), assuming that if no
>> >> transactionentry record exists the transaction date would be NULL.
>> >>
>> >> Running the report only shows items with a transactionentry records. I
>> >> verified that with various SQL statements and some items that are
>> >> active
>> >> in
>> >> the items table are not on the report.
>> >>
>> >> Further I would like to group the items by using the first 7
>> >> characters
>> >> of
>> >> the item.itemlookup code. I think i figured that out by using Formula
>> >> =
>> >> "substring(Item.ItemLookupCode,1,7)". It seems to work but I would
>> >> want
>> >> to
>> >> be sure that it also works with the non-selling items.
>> >>
>> >> And last, because I group by the first 7 character of the itemlookup
>> >> code
>> >> I
>> >> would want to trim the last 4 characters of the item.description
>> >> field.
>> >> Because the description can have different number of characters I
>> >> can't
>> >> use
>> >> a fixed length. I tried different formulas, like Formula =
>> >> "substring(Item.ItemLookupCode,1,datalength((item.description) -4))"
>> >> and
>> >> different variations of it but I always end up getting syntax errors.
>> >>
>> >> I would appreciate if somebody could check my report and point me into
>> >> the
>> >> right directions.
>> >>
>> >> Thanks
>> >>
>>


Similar ThreadsPosted
Top Selling Items Report February 23, 2007, 4:12 pm
Top Selling Items report, by Departmentt January 3, 2007, 10:23 pm
Buying and selling used items at the POS February 11, 2008, 2:42 pm
Selling items that don't exist in the database yet. December 31, 2006, 7:21 am
Need help in customizing a sales report including December 6, 2005, 12:17 pm
Dairy activity report including layaways November 5, 2007, 5:07 am
scanned items from register adds items to inventory transfer scree December 19, 2007, 2:19 pm
Kit Items Report January 7, 2008, 6:10 am
BUG? HQ Items Reports returning duplicate items March 8, 2006, 7:42 pm
help needed - Standard items vs Matrix items April 14, 2006, 10:50 am

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap