Hi..
I need a sample project to create excel reports from my project.. I searched the forum but I didint find:(
Now I am trying to make report by using help file..
Thanks already..
Mehmet..
Need An excel report file sample
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
The sample project called "Sample_Report" contains a sample report.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
-
- Posts: 51
- Joined: Fri Apr 27, 2012 12:33 pm
Re: Need An excel report file sample
Dear Mark...
During to day you helped me very times..
but now I have some trouble with reports.. For example I have an database named database.sdf
I have a datalogger named Datalogger1
and I have an item named LogItem1
so I prepare an excel file which includes the SQL queries but when I want to generate report the projects gives me error.. Please help me about this trouble..
Thanks Already..
During to day you helped me very times..
but now I have some trouble with reports.. For example I have an database named database.sdf
I have a datalogger named Datalogger1
and I have an item named LogItem1
so I prepare an excel file which includes the SQL queries but when I want to generate report the projects gives me error.. Please help me about this trouble..
Thanks Already..
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
You need to do the following steps, which are included in the Developers Manual and help file in iX Developer. Also make sure that you have permissions to write to the folder you are saving the generated report to. If you do not have those permissions that the report will not be written and iX will also not error.
I have attached a working report from the sample project you sent me.
Present the Database Data in the Report
The data retrieved from the SQLdatabase, using the queries in the configuration sheet, can be presented in the report using “named ranges” in Microsoft Excel.
A named range is created in Microsoft Excel by following these steps:
1. Select the cells to be included in a named range.
2. Click the Define name command from the Insert menu. (In Excel 2007, go
to the Formulas tab and choose Name Manager).
3. Enter a name for the range. Thenamemust be enteredinthe following
format:
“__QueryName__”.
Replace “QueryName” with the name that you have chosen for yourSQL
query.
To present the data in the report, enter the following syntax into the cells included
in the named range:
<#QueryName.DatabaseColumnName>
Replace the “DatabaseColumnName” entry with the actual name of the table in the SQLdatabase that you wish to present in the report.
I have attached a working report from the sample project you sent me.
Present the Database Data in the Report
The data retrieved from the SQLdatabase, using the queries in the configuration sheet, can be presented in the report using “named ranges” in Microsoft Excel.
A named range is created in Microsoft Excel by following these steps:
1. Select the cells to be included in a named range.
2. Click the Define name command from the Insert menu. (In Excel 2007, go
to the Formulas tab and choose Name Manager).
3. Enter a name for the range. Thenamemust be enteredinthe following
format:
“__QueryName__”.
Replace “QueryName” with the name that you have chosen for yourSQL
query.
To present the data in the report, enter the following syntax into the cells included
in the named range:
<#QueryName.DatabaseColumnName>
Replace the “DatabaseColumnName” entry with the actual name of the table in the SQLdatabase that you wish to present in the report.
- Attachments
-
- Database.xls
- (53 KiB) Downloaded 1256 times
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Need An excel report file sample
Sorry, could not find where and how to put path of the *.xls file?
I want it to be saved on SD-card or USB memory.
Regards, Waldemar
I want it to be saved on SD-card or USB memory.
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Need An excel report file sample
Thank You Mark.
I put a button " Refresh" on the screen with DatabaseViewer1 and chose click action:
void Refresh_btn_Click(System.Object sender, System.EventArgs e)
{
DatabaseViewer1.DatabaseName="database.sdf";
DatabaseViewer1.DataTableName="DataLogger1";
DatabaseViewer1.ShowData();
}
When the "Refresh" button is clicked the data are shown on the screen.
Second button "Report" was put on the screen and an action "Generate report" was attached.
It did record a file to SD card, but with an error message:
ERROR: Missing Closing Tag on formula: "<#UVquery.DataLogger1"
Whar does it mean?
Regards, Waldemar Lederer
I put a button " Refresh" on the screen with DatabaseViewer1 and chose click action:
void Refresh_btn_Click(System.Object sender, System.EventArgs e)
{
DatabaseViewer1.DatabaseName="database.sdf";
DatabaseViewer1.DataTableName="DataLogger1";
DatabaseViewer1.ShowData();
}
When the "Refresh" button is clicked the data are shown on the screen.
Second button "Report" was put on the screen and an action "Generate report" was attached.
It did record a file to SD card, but with an error message:
ERROR: Missing Closing Tag on formula: "<#UVquery.DataLogger1"
Whar does it mean?
Regards, Waldemar Lederer
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
It means your formula is wrong and is missing a closing tag. Take a look at the example report and check your formulas. From what you copied and pasted it looks like you need to add a ">" at the end.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Re: Need An excel report file sample
Thank You Mark for help. Still no success.
In the manual (iX Developer_MAEN831G_English.pdf, page 322) is written:
Enter theSQLqueries in the following format:
SQL(DatabaseName;SQLquery)
Example: SQL(General; SELECT* FROMDataLogger1)
There are two available databases: General and AuditTrail.
But, after running DatabaseViewer1 I could not find them. Click on “Browse Database” got two different databases: database.sdf and NonVolatileDatabase.sdf. Is there a mistake in the manual, or I looked in the wrong place?
Regards, Waldemar
In the manual (iX Developer_MAEN831G_English.pdf, page 322) is written:
Enter theSQLqueries in the following format:
SQL(DatabaseName;SQLquery)
Example: SQL(General; SELECT* FROMDataLogger1)
There are two available databases: General and AuditTrail.
But, after running DatabaseViewer1 I could not find them. Click on “Browse Database” got two different databases: database.sdf and NonVolatileDatabase.sdf. Is there a mistake in the manual, or I looked in the wrong place?
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
The database you want is under "MyProject\Temp\Output\database.sdf". You also need to look at page 323 of the manual. You can not just enter the "<>" query in a cell, you need to do it using the insert menu otherwise Excel does not understand that it is a query that should be executed.
From page 323:
Present the Database Data in the Report:
The data retrieved from the SQLdatabase, using the queries inthe configuration sheet, can be presented in the report using “named ranges” in Microsoft Excel. A named range is created inMicrosoft Excel by following these steps:
1. Select the cells to be included in a named range.
2. Click the Define name command from the Insert menu. (In Excel 2007, go
to the Formulas tab and choose NameManager).
3. Enter a name for the range. Thenamemust be enteredinthe following
format:
“__QueryName__”.
Replace “QueryName” with the name that you have chosen for yourSQL
query. To present the data in the report, enter the following syntax into the cells included in the named range:
<#QueryName.DatabaseColumnName>
Replace the “DatabaseColumnName” entry with the actual name of the table in
the SQLdatabase that youwish to present in the report.
From page 323:
Present the Database Data in the Report:
The data retrieved from the SQLdatabase, using the queries inthe configuration sheet, can be presented in the report using “named ranges” in Microsoft Excel. A named range is created inMicrosoft Excel by following these steps:
1. Select the cells to be included in a named range.
2. Click the Define name command from the Insert menu. (In Excel 2007, go
to the Formulas tab and choose NameManager).
3. Enter a name for the range. Thenamemust be enteredinthe following
format:
“__QueryName__”.
Replace “QueryName” with the name that you have chosen for yourSQL
query. To present the data in the report, enter the following syntax into the cells included in the named range:
<#QueryName.DatabaseColumnName>
Replace the “DatabaseColumnName” entry with the actual name of the table in
the SQLdatabase that youwish to present in the report.
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer