Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Help including Manufacturer in Low Stock Report

  1. #1
    skpr is offline Member
    Join Date
    Feb 2010
    Posts
    31

    Default Help including Manufacturer in Low Stock Report

    Hello, I am working on a custom report to show all items with stock of less than 10, and list the product's manufacturer for ease of re-ordering.

    Here is what I have so far:

    Code:
    INSERT INTO CustomReport (Name, Description, SQLCommand)
    VALUES ('Low Inventory Report', 'Report based on product variant to display inventory with less than 10 items', 'select p.sku,p.name,pv.inventory,p.published from productvariant pv inner join product p on pv.productid=p.productid where inventory < 10 and p.published = 1')
    However, I cannot figure out how to list the product's Manufacturer in the report. Help on this would be appreciated!

  2. #2
    ZachJ85 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philadelphia, PA
    Posts
    99

    Default

    Let me know if this works or not. It should, i quickly tested it.

    Code:
    select m.Name, p.sku,p.name,pv.inventory,p.published
    from productvariant pv 
    inner join product p
    on pv.productid=p.productid
    inner join ProductManufacturer pm
    on pm.ProductID = p.productid
    inner join Manufacturer m
    on m.ManufacturerID = pm.ManufacturerID
    where inventory < 10 and p.published = 1
    ORDER BY m.Name DESC
    SQL 2008, Visual Studio 2010
    Source: C#
    Version: AspDotNetStorefront ML 8.0.1.1/8.0.1.1
    Framework: .Net 4.0 (Running)

  3. #3
    skpr is offline Member
    Join Date
    Feb 2010
    Posts
    31

    Default

    That's perfect! Thanks so much for the help!