JDBC Driver for Xero

Build 23.0.8839

CreateReportSchema

Saves a dynamic ProfitAndLoss report as a custom schema.

CreateReportSchema

CreateReportSchema creates a schema file based on the specified report. This schema adds a table to your existing list that corresponds with the results of your report, which can then be queried like other tables. (Reports from the Xero are not modeled by driver as queryable tables by default.)

The generated schema file outlines the metadata for the report, such as columns and column data types. You can edit the file to adjust data types, rename columns, and include or exclude columns.

Updating a Report Schema

In the following example, the SP CreateReportSchema creates a new report using TestReportTest1 as a base template. It appends new columns to TestReportTest1 and creates a new report, named TestReport2. The new report is saved as ...\\TestReportTest2.rsd.
EXECUTE [CreateReportSchema] 
    [ReportName] = "TestReportTest2",
    [CustomFieldIdsPrimitive] = "1459925,1459928",
    [CustomFieldIdsDropdown] = "1469785",
    [CustomDimensionKeyIds] = "13539564",
    [BaseReportName] = "TestReportTest1", 
    [FileName] = "...\\TestReportTest2.rsd"

Input

Name Type Required Accepts Output Streams Description
ReportName String True False Name that should be given to the generated report. If FileStream and the 'Location' connection property are not set, the associated file will be placed in the file path set in the 'Location'
Periods Int False False The number of periods to go back from ToDate.
Timeframe String False False How big each period should be (MONTH, QUARTER or YEAR)
TrackingCategoryID String False False If you specify the trackingCategoryID parameter then the Profit and Loss Report will show figures for each of the options in the category as separate columns.
TrackingCategoryID2 String False False If you specify a second trackingCategoryID parameter then the Profit and Loss Report will show figures for each combination of options from the two categories as separate columns.
FileStream String False True An instance of an output stream where file data is written to. Only used if DownloadPath is not provided.
TenantId String False False The ID of the tenant to query instead of the connection tenant

Result Set Columns

Name Type Description
Success String A boolean indicating if the operation was successful.
FileData String If the DownloadPath and FileStream are not provided, this contains the base64 encoded content of the file.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839