Customised Report in Citect SCADA

Hello Team,

I have a project where i am working for generating customised report in Citect SCADA. I have partially done something to achieve, however need your support to complete it. 

I have logged all the real time data into SQL database using ODBE configuration. I am able to see the datas with timestamp in database.

Now when i click report, one popup has to come-up and should have a options to select starting date, starting time, ending date and ending time. when i click report button on the same screen, datas has to be fetched from database and stored in the excel sheet by using writing cicode  / Citect VBA .

Thanks and Regards,

Purusoth

  • Hi Gents,

    Any update regarding customised report ?

    Thanks
    Purusoth
  • Hi Purusoth,
    There are a lot of questions I could ask, but perhaps to cut to the chase - is there any reason why, now that the data is in an SQL database, you couldn't use SSRS or perhaps an excel or access frontend to produce your report?
  • Check TrnExportDDE. It takes data from trends and exports it to excel. But there are some limitations that may not fulfill your desired functionality. I have done most of it using same function.
  • I agree, don't use citect reporting for this, as it's super basic and doesn't offer any functionality. I would be embedding a webpage into your citect page and display an ssrs for your report.

    Edit: this assumes you're using MS SQL server as your database, but most other databases will have their own reporting services as well

  • 1) you can use CiCode to select data from SQL table to any txt file (report files is too text file) - *.CSV, *.TXT, *.HTML, *.XML and etc.
    2) you can use apache+php+ActiveX_web_browser : insert the ActiveX web-browser to a page, use php to create a web page with you data
  • Hi All,
    I think Anton said is correct you can use activeX for embedding the webpage in your SCADA and by MS SSRS you can publish your report over web page.
    Since you're able to log the data into SQL database your next step is just to fetch the data in your desired format.
    That you can do by using SQL server Data tools(Microsoft Visual Studio).
    If you're using freeware of MS SSRS then you've limitation of manipulation of Data upto 4GB max.

    Another way to achieve your desired output is by using following Cicode function
    1) FileCopy (this function will create new excel file in your predefined format).
    2)Exec (this will open your newly created file).
    3)DDEWrite functions (It will copy the Points value to Excel file and close the file).
    run this Cicode as an Event in your system.
    If you're having small number of points(Tags) to log then this one is the better way
  • We use apache+php+SQLite for alarm log (for archived alarms) instead Summary

    In Runtime it looks like at the picture