Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Script for creating report
PostPosted: Mon Feb 06, 2012 8:46 am 

Joined: Mon Feb 06, 2012 8:36 am
Posts: 10

Offline
Hello,

I need to create a printable report from some historical data. For example, I need a report which would show working hours for different periods of time, something like this:

Variable |Per hour | Per month | Per year|

Working hours | 20 mins | 20 hrs | 254 hrs
Average current | 2A | 2,5 A | 1,8 A
Custom text |tag value |tag value |tag value
I hope you got the idea.
I didn't find this kind of function using graphic interface but maybe there is any way I could this via scripting?

Thank you!

P.S. My "table" didn't work out but I hope it's clear enough!


 Profile  
 
 Post subject: Re: Script for creating report
PostPosted: Mon Feb 06, 2012 11:29 am 
User avatar

Joined: Fri Jul 15, 2011 3:21 pm
Posts: 214

Offline
Do you need to have this report saved as a text file, e-mailed or sent to a printer?

_________________
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer


 Profile  
 
 Post subject: Re: Script for creating report
PostPosted: Tue Feb 07, 2012 12:40 am 

Joined: Mon Feb 06, 2012 8:36 am
Posts: 10

Offline
Sorry for not being specific enough. Most important feature is to be able to save it as a text or .xls file, viewing the report in SCADA and sending it to printer is not so important.
Thank you!


 Profile  
 
 Post subject: Re: Script for creating report
PostPosted: Tue Feb 07, 2012 9:09 am 
User avatar

Joined: Fri Jul 15, 2011 3:21 pm
Posts: 214

Offline
Yes, this is possible with built in functionality. You can use the "DataLogger" in iX Developer to log 1 or more rows of Tag data. The data can then be exported in .CSV format which is compatible with Excel. You can export the file to a USB stick or a folder using the action "Database Export". If saved to a folder, the file can be retrieved via FTP.

If you want to create a more customized file this can be accomplished with C# scripting.

_________________
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer


 Profile  
 
 Post subject: Re: Script for creating report
PostPosted: Fri Feb 10, 2012 1:11 am 

Joined: Mon Feb 06, 2012 8:36 am
Posts: 10

Offline
Ron, thank you for your reply!
However, .csv file export is not exactly what I need. I need kind of a simple table with data. Basically, first column should be custom text which I don't need to change too often (it could be done via scripting) or connected to a string tag. Second column should be a number taken from any tag, so a tag value. I don't really need exporting trends, because I'm going to need just single value of a tag and I need something better looking and more user-friendly (better readability) than .csv file. Would you happen to have any script which I could use at least as a reference?
Thank you!

Attachment:
File comment: This is how I imagine the table should look like.
table.JPG
table.JPG [ 6.96 KiB | Viewed 4458 times ]


 Profile  
 
 Post subject: Re: Script for creating report
PostPosted: Wed Feb 22, 2012 3:35 pm 

Joined: Wed Jan 04, 2012 11:17 am
Posts: 42

Offline
Hi vilius,

Here is a sample script I created that demonstrates how to export a database table into a format similar to what you are asking for. The script generates an HTML file, and it wouldn't be very much work to format it exactly how you'd like it to look.

Let me know how it works... I hope that helps! :)


Attachments:
Script_Database_Export_HTML.zip [288.77 KiB]
Downloaded 493 times

_________________
Best Regards,

Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
 Profile  
 
 Post subject: Re: Script for creating report
PostPosted: Thu Feb 23, 2012 3:38 am 

Joined: Mon Feb 06, 2012 8:36 am
Posts: 10

Offline
Thanks a lot!
I have downloaded it and have a look some time soon.

Regards,
Vilius


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: