Jump to content
We've recently updated our Privacy Statement, available here ×

Scheduling report with rest_v2 API


rodrigo_43

Recommended Posts

Hi all,

 

I am trying to schedule a report in JSON using rest_v2 API. I've already added metatags on report, which has only got textfields.

 

Error I am getting is the following:

org.quartz.JobExecutionException: Did not find report result for {paginated: null,maxPageHeight: null, maxPageWidth: null}        atcom.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.getReportResultForOutput(ReportExecutionJob.java:744)        atcom.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:521)        atcom.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:245)        atcom.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:46)        at org.quartz.core.JobRunShell.run(JobRunShell.java:213)        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)

 

And request made to schedule such report is the following:

 

http://{ipaddress}:8080/jasperserver-pro/rest_v2/jobs?j_username=jasperadmin&j_password=jasperadmin

PUT BODY:

{
    "label": "Customers JSON Schedule",
    "creationDate": "2019-05-22T22:01:00.920-03:00",
    "trigger": {
        "simpleTrigger": {
            "startType": 2,
            "startDate": "2019-05-23 10:38",
            "misfireInstruction": 0,
            "occurrenceCount": -1,
            "recurrenceInterval": 1,
            "recurrenceIntervalUnit": "DAY"
        }
    },
    "baseOutputFilename": "Test1_FILENAME",
    "source": {
        "reportUnitURI": "/public/Reports/Test/Customers",
        "ignorePagination": true,
        "parameters": {
            "parameterValues": {
                "date_from": [
                    "2019-01-01"
                ]
            }
        }
    },
    "outputFormats": {
        "outputFormat": [
            "JSON"
        ]
    },
    "repositoryDestination": {
        "folderURI": "/public/Reports/Outputs",
        "overwriteFiles": true,
        "sequentialFilenames": false,
        "saveToRepository": true,
        "usingDefaultReportOutputFolderURI": false,
    },
    "mailNotification": {
        "bccAddresses": {
            "address": []
        },
        "ccAddresses": {
            "address": []
        },
        "toAddresses": {
            "address": [
                "rodrigo@xxxxxx.com"
            ]
        },
        "includingStackTraceWhenJobFails": true,
        "messageText": "",
        "resultSendType": "SEND_ATTACHMENT",
        "skipEmptyReports": false,
        "skipNotificationWhenJobFails": false,
        "subject": "Customers Report JSON"
    },
    "alert": {
        "version": -1,
        "recipient": "OWNER_AND_ADMIN",
        "jobState": "ALL",
        "messageText": "successNOTI",
        "messageTextWhenJobFails": "failureNOTI",
        "subject": "statusSUBJECT",
        "includingStackTrace": true,
        "includingReportJobInfo": true,
        "toAddresses": {
            "address": [
                "rodrigo@xxxxxx.com"
            ]
        }
    }
}

 

Any ideas?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...