Menu

Report types and API

ART Help
2021-02-25
2021-02-26
  • Sergio Sahuquillo

    Hi, Is there some type of report (not html, important to be able to use the API) that paints the results of a query in an excel? Thanks.

     
  • Timothy Anyona

    Timothy Anyona - 2021-02-25

    The Tabular report type should work, with reportFormat=xlsx

     
  • Sergio Sahuquillo

    That's what I thought, but when making the call I get that error:

    {
        "httpStatus": 400,
        "artStatus": "INVALID_VALUE",
        "message": "report format not allowed: htmlFancy",
        "data": null
    }
    
     
  • Edson Carlos Ericksson Richter

    Thats documented in manual:

    "If a html report format is specified, a 400 response like the following would be returned

    {
        "httpStatus": 400,
        "artStatus": "INVALID_VALUE",
        "message": "report format not allowed: html",
        "data": null
    }
    "
    
     
  • Sergio Sahuquillo

    Yeah, i know, but im not using a html report format, im using tabular type like timothy says.

     
  • Edson Carlos Ericksson Richter

    Interesting, but your example shows you are trying to export using "htmlFancy" output format. Even if a report is tabular, the output format could be choosen later at request time.
    What happens if you add a parameter "reportFormat=xls" or "reportFormat=json" to your request?

     
  • Sergio Sahuquillo

    That works, but i want to do a POST call, not a GET call, so I'm using:
    https://myArtServer/art/api/reports/run
    and I am passing the parameters in the body but it doesn't work, I tried adding the reportFormat and got this:

    {
        "httpStatus": 500,
        "artStatus": "ERROR",
        "message": "rs must not be null",
        "data": null
    }
    
     
  • Timothy Anyona

    Timothy Anyona - 2021-02-26

    Could you post the parameters you are using.

     
  • Sergio Sahuquillo

    Hello Timothy, when I read your question I started to take screenshots and do tests regarding what you and Edson told me, and in the end I found the 2 errors that I had, the first one was not indicating the reportFormat, I thought ART would use the format by default defined when the report was created, and the second was not to put in front of the name of all my parameters "p-".
    So thank you both very much for the help and sorry for the inconvenience.

     
  • Timothy Anyona

    Timothy Anyona - 2021-02-26

    OK. Glad it worked out.

     

Log in to post a comment.