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!
Script for creating report
Re: Script for creating report
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
Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer
Re: Script for creating report
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!
Thank you!
Re: Script for creating report
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.
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
Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer
Re: Script for creating report
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!
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!
Re: Script for creating report
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!
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 1402 times
Best Regards,
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Beijer Electronics, Inc.
Skylar Walker | Applications Engineer
Re: Script for creating report
Thanks a lot!
I have downloaded it and have a look some time soon.
Regards,
Vilius
I have downloaded it and have a look some time soon.
Regards,
Vilius