Custom reports based on company information can be created in the Intacct system and then used to read records.


Get Custom Report Definition

This will return the custom report definition in a company.

readReport

<readReport returnDef="true">
    <report>TestBill2</report>
</readReport>

Parameters

Name Required Type Description
returnDef Required boolean Use true
report Required string The name of the custom report definition to get

Response

report_definition

The above function returns both user-defined and system-defined arguments:

<report_definition>
    <REPORTNAME>TestBill2</REPORTNAME>
    <REPORTTYPE>tabular</REPORTTYPE>
    <ROOT>APBILLITEM</ROOT>
    <PARAMETERS>
        <PARAMETER>
            <NAME>APBILLITEM.APBILL.VENDORID</NAME>
            <label>Vendor ID</label>
            <promptOnRun>1</promptOnRun>
        </PARAMETER>
        <PARAMETER>
            <NAME>PERIOD</NAME>
        </PARAMETER>
    </PARAMETERS>
    <SORTBY>
        <APBILLITEM.APBILL.VENDORNAME>
            <dir>asc</dir>
        </APBILLITEM.APBILL.VENDORNAME>
    </SORTBY>
</report_definition>

Parameters

Name Type Description
REPORTNAME string The report name defined during creation of the report.
REPORTTYPE string The report type is either tabular or summary
ROOT string The object the report is set for
PARAMETERS array[PARAMETER] Run-time parameters of the report. It shows both user-defined and system-defined parameters.

PARAMETER

Name Type Description
NAME string Name of the parameter. Returned for both user-defined and system-defined parameters.
label string Given label of the parameter. Return for only user-defined parameters.
promptOnRun boolean Whether the parameter was defined as one that needs prompting from the user when the report is run from the UI.

Run Custom Report

This function is intended to allow developers to design a dataset and not to perform grouping and summary operations. If you need to group or summarize your data, you will need to do that in your own code on the data returned from the report. In short, only run readReport on tabular reports where grouping is not set.

readReport

Run Custom Report with Date Range Arguments

<readReport>
    <report>TestBill Date Runtime</report>
    <waitTime>0</waitTime>
    <arguments>
        <APBILL.TEST_DATE>
            <FROM_DATE>1/1/2014</FROM_DATE>
            <TO_DATE>12/31/2016</TO_DATE>
        </APBILL.TEST_DATE>
    </arguments>
</readReport>

Run Custom Report with Reporting Period Argument

<readReport returnDef="false">
    <report>Employee Time by Project</report>
    <arguments>
        <REPORTINGPERIOD>Current Year</REPORTINGPERIOD>
    </arguments>
    <waitTime>30</waitTime>
</readReport>

Parameters

Name Required Type Description
report Required string The name of the custom report to run
pagesize Optional integer Set a custom page size between 1 and 1000 items (Default: 100)
arguments Optional XMLElement[] Each argument is specified by its name (as defined in the report definition) and includes the value to be substituted into the report argument. Report arguments are defined in the report in one of two ways. Some report arguments are hard-coded in the definition of the report. Other report arguments are defined as “run time” parameters and are selected by the user when running the report.
waitTime Optional integer Set a custom wait time between 0 and 30 seconds (Default: 0)

For reports that define a PERIOD parameter (as returned in the report definition), both system reporting periods and user-defined reporting periods names may be used in the parameter.

Response

reportId

To eliminate conflicts on overlapping requests, the system returns report IDs on your initial request.

<reportId>k267Hj5x93gGrmQ12I4n6z457f83bZh3</reportId>

Parameters

Name Type Description
reportId string The stored report ID to use in subsequent readMore requests.

List Stored Custom Report Data

readMore

<readMore>
    <reportId>k267Hj5x93gGrmQ12I4n6z457f83bZh3</reportId>
</readMore>

When you reach the end of the report, the report ID no longer works. You need to initiate a new readReport request again to generate a new report ID. Think of it as if the system is running your report, giving that instance an ID, and then holding it in queue for you to read with the readMore method. After you finish reading it, the system purges it from the queue.

Parameters

Name Required Type Description
reportId Required string The report ID of the stored custom report

Provide feedback