Ask our Experts
Didn't find what you are looking for? Ask our experts!
A support forum for AVEVA Plant SCADA (formerly Citect SCADA). Share new and exciting product information, connect, learn, and collaborate with the ecosystem of Plant SCADA Users. AVEVA Plant SCADA a reliable, flexible and high-performance Supervisory Control and Data Acquisition software solution for industrial process customers. This forum is to connect, share, learn and collaborate new and exciting product information. Feel free to join and share to your Ecosystem of Plant SCADA Users.
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-17 01:32 AM
I need to generate a report in Excel using Plant SCADA 2020. Most resources I’ve found rely on Calendar Control and Date/Time Picker in ActiveX, but these are not available in the 2020 version. As a workaround, I used the Calendar Genie for date selection, but I cannot find any functions related to time input.
Since I need to provide both Start Date, End Date, and Start Time, End Time, how can I generate a report in PLANT SCADA with Start & End Date & Time exported to Excel?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-21 10:30 PM
Hi @Dilhan
Just one small correction, there isn't a 2020 version of Plant SCADA, I believe you must be referring to "Plant SCADA 2020 R2". To the best of my knowledge there isn't any reason why the Calendar Control or Date/Time picker ActiveX controls would not be available. It might be worth double checking.
Ultimately you should be able to achieve what you want with a String tag on the page with the operator able to enter date and time information. Then the generate report button could use these an inputs. Or the report itself could use the String variables to define the data range.
The following is guidance from a GPT (please treat all information on face value, fact check and test any suggestions, and this information is shared without any warrantee or guarantee - use at your own discretion):
To generate a report in AVEVA Plant SCADA (formerly Citect SCADA) with dynamic start and end date/time parameters, exported to Excel, you can use a combination of built-in reporting features, Cicode functions, and user input controls like ActiveX calendar and date/time pickers. This allows flexibility for users to select times via tags or forms, and output data (e.g., trends, alarms, or custom data) to a CSV file, which can be easily opened and formatted in Excel.
STRING sdate, edate, Em, D, M, Y;
D = DateDay(TimeCurrent());
M = DateMonth(TimeCurrent());
Y = DateYear(TimeCurrent(),1);
sdate = "Start Date";
edate = "End Date";
FormNew("Select Report Date", 38, 2, 16);
FormInput(20, 0, "DD-MM-YYYY Format", Em, 20);
FormComboBox(2, 0, 15, 6, sdate, 1);
FormAddList(D + "-" + M + "-" + Y);
FormButton(8, 1, "Select", 0, 1);
FormButton(16, 1, "Cancel", 0, 2);
FormRead(0);
// Convert to full start/end strings
STRING START_DATE_TIME = Y + "-" + M + "-" + D + " 00:00:00"; // Add time as needed
TagWrite("StartDateTag", START_DATE_TIME); // Store in dynamic tag
[Report Header]
Report Generated: [Date] [Time]
[Trend]
Tag = YourTrendTagName
Start = {1} // Dynamic start time parameter
End = {2} // Dynamic end time parameter
Period = 60 // Sampling interval in seconds (dynamic via tag if needed)
Samples = 360 // Number of samples (e.g., 6 hours at 1-min intervals)
[Alarm Summary]
Start = {1}
End = {2}
Category = *
State = *
FUNCTION GenerateDynamicReport()
STRING StartDate = TagRead("StartDateTag"); // e.g., "2025-09-22"
STRING StartTime = TagRead("StartTimeTag"); // e.g., "08:00:00"
STRING EndDate = TagRead("EndDateTag");
STRING EndTime = TagRead("EndTimeTag");
// Combine into full timestamps
REAL StartTimestamp = StrToDate(StartDate) + StrToTime(StartTime);
REAL EndTimestamp = StrToDate(EndDate) + StrToTime(EndTime);
// Convert back to strings for parameters (if needed for report)
STRING StartStr = DateToStr(StartTimestamp, 0) + " " + TimeToStr(StartTimestamp, 0);
STRING EndStr = DateToStr(EndTimestamp, 0) + " " + TimeToStr(EndTimestamp, 0);
// Run the report and output to CSV (opens in Excel)
INT Result = RunReport("MyReport", "C:\Reports\MyReport.csv", 1, StartStr, EndStr); // 1 = output to file
IF Result = 0 THEN
Message("Report Generated", "Report saved to C:\Reports\MyReport.csv", 0);
ELSE
Message("Error", "Failed to generate report. Error: " + IntToStr(Result), 0);
END
END
TrnExportCSV("C:\TrendData.csv", StrToDate(StartDate) + StrToTime(StartTime), 60, 360, "*", 0); // * = all trends, 60s interval, 360 samples
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-22 09:10 PM . Last Modified: 2025-09-22 09:15 PM
These are the Microsoft ActiveX controls I have. When I click on another Microsoft control, I get this message.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2025-09-23 10:02 PM
Hi @Dilhan
It looks like you don't have the required Microsoft license to use those Microsoft ActiveX controls. My understanding is that you must have a valid Microsoft Office license to make use of these controls.
Kind regards
Olivier
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.