Custom reports
-
- Lieutenant (LT)
- Posts: 71
- Joined: Mon Dec 13, 2004 5:35 pm
- Location: Santa Barbara, CA
- Contact:
Custom reports
Is it possible to do custom reports in AC7 without having the source code? I did some custom reports in AC5, but looking at the code for reports in AC7 it looks much harder to do your own. I need to get a report by payment type, like the daily sales report, but with the utilized payment methods as the rows instead of the individual order ids.
- Shopping Cart Admin
- AbleCommerce Admin
- Posts: 3055
- Joined: Mon Dec 01, 2003 8:41 pm
- Location: Vancouver, WA
- Contact:
Re: Custom reports
Hello,
Both are written in asp.net which is pretty easy to access the database information. So I wouldn't think either product has an edge in report creation. The source code wouldn't be needed at all.
Both are written in asp.net which is pretty easy to access the database information. So I wouldn't think either product has an edge in report creation. The source code wouldn't be needed at all.
-
- Lieutenant (LT)
- Posts: 71
- Joined: Mon Dec 13, 2004 5:35 pm
- Location: Santa Barbara, CA
- Contact:
Re: Custom reports
But the new ones use the ReportDataSource class which has methods that I can't change or add to. The reports in Able 5 used SQL which made them easier to modify. I could write them from scratch using SQL, but some of them I just want to add a field to. For example, I would like to add item counts to the daily sales report.
Re: Custom reports
Either you are looking to show order items count against each order entry in reprot or want to show total order numbers on report I think its possiable without source ReportDataSource. If this is the order item count then add new column to gridview. Add a new method called int CountOrderItems(Object dataItem) in back end code. Finally use this method in new column something like
and method code should be something like
Code: Select all
<%#CountOrderItems(Container.DataItem)%>
Code: Select all
protected int CountOrderItems(Object dataItem)
{
OrderSummary summary = (OrderSummary)dataItem;
Order order = OrderDataSource.Load(summary.OrderId);
int productCount = 0;
foreach (OrderItem orderItem in order.Items)
if (orderItem.OrderItemType == OrderItemType.Product)
productCount++;
return productCount;
}
-
- Lieutenant (LT)
- Posts: 71
- Joined: Mon Dec 13, 2004 5:35 pm
- Location: Santa Barbara, CA
- Contact:
Re: Custom reports
Thanks. That will really help. I will try that this morning. I would also like the ability to add new reports. For example, a report on the payment types used for a date range of orders. Would I need to add a method for ReportDataSource to do that?
Re: Custom reports
You don't need to add any thing to ReportDataSource. You can crate your custom class under with custom queries under App_Code folder of your website. Finally you can create your report UI and make use of your custom class to fetch the desired data against desired input.
-
- Lieutenant (LT)
- Posts: 71
- Joined: Mon Dec 13, 2004 5:35 pm
- Location: Santa Barbara, CA
- Contact:
Re: Custom reports
While I have you in a discussion, one example of a modification to an existing report I need is the product breakdown report. It would be good if we could see the variants in that.
Re: Custom reports
We have number of partners who provide custom development services. Have a look at partners page.
http://www.ablecommerce.com/Development ... 11C33.aspx
http://www.ablecommerce.com/Development ... 11C33.aspx