question

Babar Q. avatar image
Babar Q. asked ·

Save as PDF Scheduled Task

Dear All,

Can we make a schedule to save a report in the PDF form instead of sending by email?

Regards,

Babar

dashboardnam
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Andrzej L. avatar image
Andrzej L. answered ·

Yes. Please check the file tasks-examples.xml-examples in the config directory. In the file there is an example of scheduled task to export file in pdf format.

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hello @Andrzej L.

Thank you for the prompt response.

Which parameters are mandatory to change?

How to schedule the report after mandatory changes?

<tasks>
<!-- ------------------------------------
    Example of export of DMI report
-->
    <task ID="SaveReportCommand" name="SaveReportCommand" periodType="DAY" period="1" timeLine="SERVER" offsetTime="00:30" timeout="01:00" >
        <command ID="0">
            <class>SaveDmiReportCommand</class>
			<!-- mandatory parameters -->
            <param name="report">Software Services</param>
            <param name="out">{delta.root}{file.separator}exportReports{file.separator}Software Services [datetime].pdf</param>
            <param name="user">Batman</param>
			<param name="format">pdf</param>
			<!-- optional parameters -->
			<param name="timeFormat">HH:mm:ss.SSS</param>
			<param name="dateFormat">dd/MM/yy</param>
			<param name="language">ja</param>
			<param name="decimalSeparator">,</param>
			<param name="groupingSymbol"> </param>
			<param name="timeZone">US/Central</param>
			<param name="locale">fr_FR</param>
			<param name="customParameters">FILTER_appl=SAP*&timeRange=7d&timeResolution=DAY</param>
        </command>
     </task>

Regards,

Babar

0 Likes 0 · ·
Babar Q. avatar image
Babar Q. answered ·

Hello @Frans S.

I just want to save a scheduled report on the CAS server. Below are the examples of your modified script and the script is available for me in the task-examples.

If I use your script and just change the DMI report name and offsetime then where it is going to store the .pdf file?

<task ID="MO_PdfMail_Test" name="MonthlyOverview-PdfMail_Test" periodType="MONTH" period="1" timeLine="SERVER" offsetTime="00:04:05" timeout="00:10">
    <command ID="1">
      <class>adlex.delta.scheduler.command.SaveReportCommand</class>
      <param>/LSSaveAs?lsAction=Saveas&format=pdf&lsEntryName=Monthly+Overview+Application+Service+Management+-+Scheduled&FILTER_bgParent=Test</param>
      <param>{delta.root}{file.separator}SchedRpt{file.separator}Monthly_Transaction_Overview_Test.pdf</param>
    </command>
-------------------------------------------------------------------------------
    <task ID="SaveReportCommand" name="SaveReportCommand" periodType="DAY" period="1" timeLine="SERVER" offsetTime="00:30" timeout="01:00" >
        <command ID="0">
            <class>SaveDmiReportCommand</class>
			<!-- mandatory parameters -->
            <param name="report">Software Services</param>
            <param name="out">{delta.root}{file.separator}exportReports{file.separator}Software Services [datetime].pdf</param>
            <param name="user">Batman</param>
			<param name="format">pdf</param>
			<!-- optional parameters -->
			<param name="timeFormat">HH:mm:ss.SSS</param>
			<param name="dateFormat">dd/MM/yy</param>
			<param name="language">ja</param>
			<param name="decimalSeparator">,</param>
			<param name="groupingSymbol"> </param>
			<param name="timeZone">US/Central</param>
			<param name="locale">fr_FR</param>
			<param name="customParameters">FILTER_appl=SAP*&timeRange=7d&timeResolution=DAY</param>
        </command>
     </task>

Regards,

Babar

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Frans S. avatar image
Frans S. answered ·

Yes, like Andrzej says.
Also have a look at this topic, where examples are given:

https://answers.dynatrace.com/questions/211758/daily-report-add-datetime-to-report-name.html?childToView=211995#answer-211995

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hello @Frans S.

Thank you for the shared link. I just want to schedule a daily report in the .pdf format and save on the CAS server.

Should I make a copy of the tasks-examples and save it in the .xml format after removing the additional information in the file except the task ID="SaveReportCommand"?

What else I will have to change in the below?

    <task ID="SaveReportCommand" name="SaveReportCommand" periodType="DAY" period="1" timeLine="SERVER" offsetTime="00:30" timeout="01:00" >
        <command ID="0">
            <class>SaveDmiReportCommand</class>
			<!-- mandatory parameters -->
            <param name="report">Software Services</param>
            <param name="out">{delta.root}{file.separator}exportReports{file.separator}Software Services [datetime].pdf</param>
            <param name="user">Batman</param>
			<param name="format">pdf</param>
			<!-- optional parameters -->
			<param name="timeFormat">HH:mm:ss.SSS</param>
			<param name="dateFormat">dd/MM/yy</param>
			<param name="language">ja</param>
			<param name="decimalSeparator">,</param>
			<param name="groupingSymbol"> </param>
			<param name="timeZone">US/Central</param>
			<param name="locale">fr_FR</param>
			<param name="customParameters">FILTER_appl=SAP*&timeRange=7d&timeResolution=DAY</param>
        </command>
     </task>

Regards,

Babar

0 Likes 0 · ·