Ewon TechForum
Providing technical solutions to technical requests


ExeSSI works in the template but not in the emailed copy
ablooabloo Offline
Junior Member
#1
Hi,

I'm trying to generate reports with a dynamic data range, the goal being to display relevant data for only one "round" of production. To this end, I have a script in the eWon BASIC IDE to generate an EBD, which is then read by the .shtm page in order to get the data. A report is then emailed at completion.

The template itself seems to work if I load it directly from the eWon, but the ExeSSI blocks seem to run into some kind of a problem when I view the email attachment. They don't seem to get the data I need.

I've tried to run a sample snippet of code (reading a tag description) as well and the same thing happens. If I go through the eWon and load the .shtm directly the code works, but if I try to have it sent by email then it doesn't seem to get executed correctly.

I also run TagSSI commands in the .shtm which work.

ExeSSI block :

Code:
<%#ExeSSI,
SETSYS TAG,"load","Temp306_EBD"
ebd1$ = GETSYS TAG,"TagValue"
OPEN ebd1$ FOR TEXT INPUT AS 1
readLoop1:
a1$ = Get 1
PRINT #0,a1$;
IF a1$ <> "" THEN GOTO readLoop1
CLOSE 1%>

BASIC script to generate the EBDs :
 
Code:
Temp306_EBD@ = "exp:$dtHL $ftT $st" + Jours$ + Moiss$ + Annees$ + "_" + Hdcs$ + Mdcs$ + Sdcs$ + " $et" + Jours$ + Moiss$ + Annees$ + "_" + Hfcs$ + Mfcs$ + Sfcs$ + " $tnTemperature_306"
Pres306_EBD@ = "exp:$dtHL $ftT $st" + Jours$ + Moiss$ + Annees$ + "_" + Hdcs$ + Mdcs$ + Sdcs$ + " $et" + Jours$ + Moiss$ + Annees$ + "_" + Hfcs$ + Mfcs$ + Sfcs$ + " $tnPression_306"
CTemp306_EBD@ = "exp:$dtHL $ftT $st" + Jours$ + Moiss$ + Annees$ + "_" + Hdcs$ + Mdcs$ + Sdcs$ + " $et" + Jours$ + Moiss$ + Annees$ + "_" + Hfcs$ + Mfcs$ + Sfcs$ + " $tnSetpoint_Temperature_306"
CPres306_EBD@ = "exp:$dtHL $ftT $st" + Jours$ + Moiss$ + Annees$ + "_" + Hdcs$ + Mdcs$ + Sdcs$ + " $et" + Jours$ + Moiss$ + Annees$ + "_" + Hfcs$ + Mfcs$ + Sfcs$ + " $tnSetpoint_Pression_306"


Sample EBD :

Code:
exp:$dtHL $ftT $st19052020_121047 $et19052020_122011 $tnTemperature_306

Thanks for any help.
Reply

simon Offline
eWON Support
#2
Hi,

To my point of view, the problem is caused by the command PRINT #0,a1$;
which only works to output data into the web browser.
When I use in the email sending as you do, I get the error : east-Invalid Parser name in InitSSI
Do you get the same ?

To me, the best option to keep you EBD String Tags is to handle your alarm notification by script (ONALARM command).
You can then send an email using SENDMAIL containing the custom EBD you want to use (according to the Tag that has fired the ONALARM).

Simon
Reply



Possibly Related Threads…
31-08-2017, 05:46 PM
Last Post: AngelaT



Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy