cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SMTPReportCommand for Scheduled Task

gregg_kniss
Guide

Can the report type be specific with the SMTPReportCommand? We currently have a few tasks that we use SaveReportCommand then SMTPCommand. We can save as PDF that way. I would like to use SMTPReportCommand because it's a one liner, but it defaults to MHT.

9 REPLIES 9

adam_piotrowicz
Dynatrace Pro
Dynatrace Pro

Gregg,

I understand you're trying to use "format=pdf" in the report link?

Could you share the command syntax you're trying to use?

gregg_kniss
Guide

No actually I am using the below command adapted from the documentation.


adlex.delta.scheduler.command.SMTPReportCommand
/LSServlet?lsAction=LoadByName&lsEntryName=ReportName&dmiAction=Generate
email.address@somedomain.com
Subject

We currently use the SaveReportCommand in which you do specify format=pdf and a SMTPCommand to email, but this takes two commands for one task.

Try to use same URL as in double-command task.

 

 

gregg_kniss
Guide

I tried just adding format=pdf, but it didn't work. I don't see how using the whole URL would work since it is attempting to saveas and you must provide a path since it saves an actual file. This is what I am currently using however SMTPReportCommand performs these two commands in one, but without an option for report type, i.e. MHT,PDF,etc.


adlex.delta.scheduler.command.SaveReportCommand
/LSSaveAs?lsAction=Saveas&format=pdf&lsEntryId=123
{delta.root}{file.separator}FolderName{file.separator}Filename.pdf


adlex.delta.scheduler.command.SMTPCommand
{delta.root}{file.separator}Foldername{file.separator}Filename.pdf
email.address@somedomain.com
Subject
pdf/pdf

Gregg,

So you mean that:

 
adlex.delta.scheduler.command.SMTPReportCommand
/LSServlet?lsAction=LoadByName&format=pdf&lsEntryName=ReportName&dmiAction=Generate
email.address@somedomain.com
Subject

does not work?

Please confirm and we will investigate.

This is correct. I still get the .mht file.

Gregg,

This deserves support ticket ...

jean_louis_lorm
Dynatrace Pro
Dynatrace Pro

Hello,

 

I have attached some Tasks that work correctly.

tasks-502-Export_Config.xml

tasks-600-PFSA_Weekly_Report.xml

tasks-604-PFSA_Synthese.xml

When you change the configuration of your task, change the name too, it's a best practice to update a fresh configuration into the CAS environment. And verifiy that you don't have the same task in different files (in the task and the copy of this task for exemple).

Add the  name after the ID.

 

Regards,

JLL

gregg_kniss
Guide

I appreciate your input. I edited my previous comment. What I have shown works currently, but I would like to use the SMTPReportCommand since it is only one command instead of two. I just don't see the option to set file type, i.e. PDF, etc.