Need An excel report file sample

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Need An excel report file sample

Post by wlederer »

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

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Need An excel report file sample

Post by wlederer »

Dear Mark, which version of Excel was used when Sample_Report was developed? I use Excel 2003. May be, it does Matter?
Regards, Waldemar

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Need An excel report file sample

Post by mark.monroe »

The sample report was made in version 2007 of excel.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Need An excel report file sample

Post by wlederer »

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

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Need An excel report file sample

Post by mark.monroe »

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.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Need An excel report file sample

Post by wlederer »

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

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Need An excel report file sample

Post by mark.monroe »

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

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Need An excel report file sample

Post by wlederer »

Thank You Mark. I got it working. How can I choose USB or SD (depending what is inserted) per script?

Regards, Waldemar

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Need An excel report file sample

Post by mark.monroe »

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

wlederer
Posts: 175
Joined: Fri Jan 27, 2012 4:20 am

Re: Need An excel report file sample

Post by wlederer »

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

Post Reply