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 :
<%#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 :
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 :
exp:$dtHL $ftT $st19052020_121047 $et19052020_122011 $tnTemperature_306
Thanks for any help.
EDIT :
I have switched to a method involving Web-context variables, same thing happens.
ExeSSI to get the EBD from the BASIC variables :
<%#ExeSSI,
SETSYS TAG,"load","Temp306_EBD"
ebdtemp! = GETSYS TAG,"TagValue"
SETSYS TAG,"load","CTemp306_EBD"
ebdtempc! = GETSYS TAG,"TagValue"
SETSYS TAG,"load","Pres306_EBD"
ebdpres! = GETSYS TAG,"TagValue"
SETSYS TAG,"load","CPres306_EBD"
ebdpresc! = GETSYS TAG,"TagValue"%>
ParamSSI :
<%#ParamSSI,+ebdtemp%>
I have modified the EBD formatting to run it in ParamSSI. Example :
[$dtHL$ftT$st19052020_121047$et19052020_122011$tnTemperature_306]
The ExeSSI tag doesn’t seem to run in my email attachments.
EDIT 2 :
I have tried to copy and paste a code snippet from the Web Reference guide. Even that does not work when I open the attachment, but everything works when I access the file from the /usr folder. I have “east-Invalid Parser name in InitSSI” in the log when the email is sent but not when the file is accessed directly on the eWon. Perhaps something to do with the EBD that sends the email attachment?
ebd$ = "&[$dtUF$uf/usr/rap306.shtm$fnrap306.html]"
SENDMAIL "email@email.com", "", "Rapport de production", ebd$
I appreciate any insight.