Thank You Mark. As I understood from Your answer, the manual is outdated. It was written for program with a different embedded database.
1.I named 3 cells in Excel as: _UVquery_
(for Excel 2003: Insert>Name>Define)
2.Added new worksheet and named it: <#Config>
3.Put in the new worksheet into the cell 10A: UVquery
What should I put into cell 10B:
SQL(database; SELECT* FROM DataLogger1),
or SQL(database.sdf; SELECT* FROM DataLogger1),
or SQL("database.sdf"; SELECT* FROM DataLogger1), or something different?
Regards, Waldemar
Need An excel report file sample
Re: Need An excel report file sample
Dear Mark, which version of Excel was used when Sample_Report was developed? I use Excel 2003. May be, it does Matter?
Regards, Waldemar
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
The sample report was made in version 2007 of excel.
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 will try to find Office 2007.
Our IT expert promised to help with SQL queries, but he asked for exact path for the database. Is it "\\database.sdf"?
Regards, Waldemar
Our IT expert promised to help with SQL queries, but he asked for exact path for the database. Is it "\\database.sdf"?
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
On your PC, the database is at: "MyProject\Temp\Output\database.sdf"
On the HMI, you should already knows its path, as you are querying the database in the project that you sent me.
On the HMI, you should already knows its path, as you are querying the database in the project that you sent me.
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. In the manual on the page #323 is written:
3. Enter a name for the range. The name must be entered in the following
format:
“__QueryName__”.
But in Sample_Report in the Database.xls file the cells actually named as:
"__QueryName__X"
What is the meaning of "X"?
Regards, Waldemar
3. Enter a name for the range. The name must be entered in the following
format:
“__QueryName__”.
But in Sample_Report in the Database.xls file the cells actually named as:
"__QueryName__X"
What is the meaning of "X"?
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
It works without the X as well. I am not sure why the developers put an X 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. I got it working. How can I choose USB or SD (depending what is inserted) per script?
Regards, Waldemar
Regards, Waldemar
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Need An excel report file sample
The easiest way would be to create two buttons and have one save it to a SD card and the other one the USB. Then change the visibility of the buttons depending on where you want your report saved.
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 very much Mark for the help. The Report works OK. But it is still confusing. I put button on screen and defined the click funktion:
void Refresh_btn_Click(System.Object sender, System.EventArgs e)
{ DatabaseViewer1.DatabaseName="database.sdf";
DatabaseViewer1.DataTableName="DataLogger1";
DatabaseViewer1.ShowData();
}
It works fine.
Why should I put into SQL query "General;" for database name, not the ""database.sdf";"?
Where the "General;" comes from? The DatabaseViewer does not show it.
Regards, Waldemar
void Refresh_btn_Click(System.Object sender, System.EventArgs e)
{ DatabaseViewer1.DatabaseName="database.sdf";
DatabaseViewer1.DataTableName="DataLogger1";
DatabaseViewer1.ShowData();
}
It works fine.
Why should I put into SQL query "General;" for database name, not the ""database.sdf";"?
Where the "General;" comes from? The DatabaseViewer does not show it.
Regards, Waldemar