Store owner would like some customized reports. For starters, one listing inventory by manufacturer, and another listing low inventory by manufacturer. I suspect more will be required in the future.
Are there any documents or threads about general reporting process and creating custom reports?
Docs/tutorials for writing custom reports
Re: Docs/tutorials for writing custom reports
You can write new reports via writing your custom queries
http://wiki.ablecommerce.com/index.php/Custom_Queries
Also there are many code samples available in forums about data access, check
viewforum.php?f=47
Here are some mods discussed in reports
viewtopic.php?f=44&t=9101
viewtopic.php?f=44&t=8713
viewtopic.php?f=42&t=8873
viewtopic.php?f=45&t=8496
http://wiki.ablecommerce.com/index.php/Custom_Queries
Also there are many code samples available in forums about data access, check
viewforum.php?f=47
Here are some mods discussed in reports
viewtopic.php?f=44&t=9101
viewtopic.php?f=44&t=8713
viewtopic.php?f=42&t=8873
viewtopic.php?f=45&t=8496
Re: Docs/tutorials for writing custom reports
mazhar,
I viewed the sample on wiki but I am still unclear on how to retreive and process the sql query return.
I have something like this:
I want to iterate through the returned data and build a report.
I viewed the sample on wiki but I am still unclear on how to retreive and process the sql query return.
I have something like this:
Code: Select all
CommerceBuilder.Data.Database database = Token.Instance.Database;
string sql = ("<my really comprehensive inventory query that is tested and debugged in SQL Mgmt Express>");
using (System.Data.Common.DbCommand selectCommand = database.GetSqlStringCommand(sql))
{
database.ExecuteScalar(selectCommand);
-
- Ensign (ENS)
- Posts: 9
- Joined: Tue Dec 08, 2009 8:50 am
Re: Docs/tutorials for writing custom reports
Has anyone ever done a basic, step by step how-to for changing or adding a custom report? That would be wildly helpbul. In my case, I'm trying to follow the examples, but what in the world is the .aspx.cs file for? What does it do and do I need to create one (and how)?
Re: Docs/tutorials for writing custom reports
You need to call execture reader on you db command that will retrun you a reader to itterate over your returned data. For examplevieodesign wrote:Has anyone ever done a basic, step by step how-to for changing or adding a custom report? That would be wildly helpbul. In my case, I'm trying to follow the examples, but what in the world is the .aspx.cs file for? What does it do and do I need to create one (and how)?
Code: Select all
using(IDataReader dr = database.ExecuteScalar(selectCommand))
{
while(dr.Read())
{
//Here read columns from current row read by reader like
int id = AlwaysConvert.ToInt(dr[0]);
string name = AlwaysConvert.ToString(dr[1]);
}
dr.Close();
}
Re: Docs/tutorials for writing custom reports
I think there was something about a custom report available at plugables.com, have a look at herevieodesign wrote:Has anyone ever done a basic, step by step how-to for changing or adding a custom report? That would be wildly helpbul. In my case, I'm trying to follow the examples, but what in the world is the .aspx.cs file for? What does it do and do I need to create one (and how)?
http://blog.plugables.com/tag/report/