Caused by: java.sql.SQLException: Year out of range.

Export to Excel.

I'm using getdatasubsetdownloadlinkfromrule to get the link to download the excel. The Link work fine if I don't filter the report with Date and Time criteria, if I use ToDate or FromDate in the report Search i get "Error 500 - Internal Server Error".
I have a DateTime field in the Table and my Report has Date field which I'm converting to datetime.

Error detail attached
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
...
...
Caused by: java.sql.SQLException: Year out of range.

OriginalPostID-163797

OriginalPostID-163797

  Discussion posts and replies are publicly visible

Parents
  • Hi Sikandard .. Could you please paste your code here for reference .. I am not able to resolve the issue yet .. Pasting my code here ..

    Rule: Report_HomeScreen

    local!datasubsetNew_any: rule!Report_getDataSubset(
    fromDateTime_dtm: local!fromDateTime_dtm,
    toDateTime_dtm: local!toDateTime_dtm,
    pagingInfo_any: a!pagingInfo(startIndex: 1, batchSize: -1)
    ),
    local!exportUri: getdatasubsetdownloadlinkfromrule(
    rule!Report_getExportableDataSubset,
    a!toJson(
    {
    fromDateTime_dtm: local!fromDateTime_dtm,
    toDateTime_dtm: local!toDateTime_dtm
    }
    )
    )



    Rule: Report_getExportableDataSubset

    with(
    /*-- ri!input of type TEXT --*/
    local!searchParam: a!fromJson(
    ri!input
    ),
    /*-- Forming DataSubset again instead of passing as JSON parameter--*/
    local!datasubsetNew_any: rule!Report_getDataSubset(
    fromDateTime_dtm: local!searchParam.fromDateTime_dtm,
    toDateTime_dtm: local!searchParam.toDateTime_dtm,
    pagingInfo_any: a!pagingInfo(startIndex: 1, batchSize: -1)
    ),
    'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'
    (
    datasubset: local!datasubsetNew_any,
    fieldNames: {"requestStatus","requestId","ageOfStatus"},
    fieldLabels: {"STATUS OF CDD","COUNT","AGING IN DAYS"},
    filename: "AgingReport"
    )
    )
Reply
  • Hi Sikandard .. Could you please paste your code here for reference .. I am not able to resolve the issue yet .. Pasting my code here ..

    Rule: Report_HomeScreen

    local!datasubsetNew_any: rule!Report_getDataSubset(
    fromDateTime_dtm: local!fromDateTime_dtm,
    toDateTime_dtm: local!toDateTime_dtm,
    pagingInfo_any: a!pagingInfo(startIndex: 1, batchSize: -1)
    ),
    local!exportUri: getdatasubsetdownloadlinkfromrule(
    rule!Report_getExportableDataSubset,
    a!toJson(
    {
    fromDateTime_dtm: local!fromDateTime_dtm,
    toDateTime_dtm: local!toDateTime_dtm
    }
    )
    )



    Rule: Report_getExportableDataSubset

    with(
    /*-- ri!input of type TEXT --*/
    local!searchParam: a!fromJson(
    ri!input
    ),
    /*-- Forming DataSubset again instead of passing as JSON parameter--*/
    local!datasubsetNew_any: rule!Report_getDataSubset(
    fromDateTime_dtm: local!searchParam.fromDateTime_dtm,
    toDateTime_dtm: local!searchParam.toDateTime_dtm,
    pagingInfo_any: a!pagingInfo(startIndex: 1, batchSize: -1)
    ),
    'type!{urn:appian:plugin:datasubsetdownload:types}ExportableDataSubset'
    (
    datasubset: local!datasubsetNew_any,
    fieldNames: {"requestStatus","requestId","ageOfStatus"},
    fieldLabels: {"STATUS OF CDD","COUNT","AGING IN DAYS"},
    filename: "AgingReport"
    )
    )
Children
No Data