I have upgraded my 7.0.7 database to Gold and when trying the various reports the Sales by Product Report is not working. All of the other sales and product reports seem to be correct.
Here is what is what is in the error log.
An error has occured at http://devstore.weighdown.com/Admin/Rep ... oduct.aspx
Exception: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: No row with the given identifier exists[CommerceBuilder.Products.Vendor#0] Inner Exception Stack Trace: at NHibernate.Impl.SessionFactoryImpl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) at NHibernate.Proxy.DefaultLazyInitializer.Intercept(InvocationInfo info) at VendorProxy.get_Name() at CommerceBuilder.Reporting.ReportDataSource.GetProductBreakdownSummary(DateTime fromDate, DateTime toDate, Int32 vendorId, String sortExpression) at AbleCommerce.Admin.Reports.ProductBreakdown.BindReport() at AbleCommerce.Admin.Reports.ProductBreakdown.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Sales By Product Report throwing error
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: Sales By Product Report throwing error
Apparently something is wrong with the data. Probably some product is assigned a warehouse that does not exist.
Re: Sales By Product Report throwing error
The Sales by product report runs fine in our 7.0.7 store. So if there is something wrong with the data, then it the upgrade script broke it. Either that or there is a problem with the new report.
FYI - I did verify that the all warehouses do exist.
Any other suggestions?
FYI - I did verify that the all warehouses do exist.
Any other suggestions?
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: Sales By Product Report throwing error
Code: Select all
No row with the given identifier exists Inner Exception: No row with the given identifier exists[CommerceBuilder.Products.Vendor#0] Inner Exception Stack Trace: at
----
In AC7 data integrity checks were not fully enforced. So it was possible to have references to old entities that no more existed in the system. However in AC Gold data integrity checks are enforced. From the exception it looks like NHibernate tries to load a vendor associated with a product. It fails to find the vendor and throws an exception.
Re: Sales By Product Report throwing error
That was it. We do not use the Vendor field and somehow for some products the VendorId field was set to 0 and the rest where set to null, so I updated the column to set all values to null and now the report works.
Thanks for the help!
Thanks for the help!
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: Sales By Product Report throwing error
We will update our upgrade scripts to ensure this happens automatically.