EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-11-23 11:46 PM . Last Modified: 2023-05-02 11:50 PM
Hello everyone,
I get report with using Crystal Report but i have a problem with Event List. Event List not updating automatically
My Crystal Report page is like in the below. In the bottom of the page i have an Event List where I marked in red. I want to update this list automatically when any situation occurs. How can this situation be resolved? Do i need script or anything? Could you help me?
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: 2022-11-24 12:26 AM
Event logs do not refresh automatically, this avoids excessive server loading.
You could add a refresh button, which could refresh the SQL in the query (use an animated query).
Or, don't use the event list for report status, animate the tags on the report which indicate report status and last run time.
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: 2022-11-28 05:14 AM
How can i add Refresh button or something like this for situation? Or how can we use "Animation" for refresh list automatically? I couldn't find how to do it. Can you help me?
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: 2022-11-28 07:45 AM
Your best bet is to use VBScript to do what you want.
A script can be used to call the Generate or Export methods on the report, then on the next line refresh the list. Note, you can't call the native report generation dialogue from script so if your report has parameters then you'll need to pass those in with the script.
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: 2022-11-28 09:51 AM
To create a refresh button for the embedded list, create a button with a "Script" pick action, where the code sets the "Sql" property of the list, see Core Reference > Mimics > Animations > Sql
The code will be something like:
Mimic.Layers(0).Item("Lst_1").Sql="<insert query here>"
Where "Lst_1" is the name of the list (and is located on the first layer of the mimic), and the string specifies the required SQL query.
Alternatively, simply left click on the list and choose "Refresh Query" menu option.
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: 2022-11-28 11:16 PM
Hello,
I tried some SQL queries but it didn't work. I have set this myself but what does "Mode" do and I don't know which one to choose. The same goes for "Permission". Can you explain these two options and check if my sql query is true or false?
Also, Mimic page with button has has two different layers as "Data" and "Frame" as in the screenshot. The button is in Data Layer.
In addition, is there any command or script that can close the current page and open a new page when the button is pressed? I think it's like refresh the page.
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: 2022-11-29 02:46 AM
That code is not well-formed VBScript nor valid SQL:
- The query string contains embedded double-quotes which haven't been escaped (or removed).
- The query string contains multiple lines.
- Tilde characters (~) in strings don't 'work' in VBScript.
- The SQL is prefixed with '<' and suffixed with '>'. NB. "<insert query here>" is using BNF where symbols are enclosed in chevrons.
Mimic.Layers("Data").Item("Lst_5").Sql="SELECT TOP( 2 ) RecordTime, Source, Message, User FROM CDBEVENTJOURNAL WHERE ( RecordTime BETWEEN { OPC 'H-1H' } AND { OPC 'H+1H' } ) AND ( Message LIKE '%Generate report%' ) ORDER BY Source ASC, RecordTime DESC"
The Mode and Permission attributes are both described in the help, see Core Reference > Coding > Scripting > Associate a Mimic Script with a Script Pick Action
Link copied. Please paste this link to share this article on your social media post.
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.