cancel
Showing results for 
Search instead for 
Did you mean: 

How to export CR to pdf by API Gateway

Channa
Explorer
0 Kudos

Hello SAP Support Teams,

I have been looking for solution how to export crystal reports via API Gateway but still not get right answer.

I have checked document link below.

https://help.sap.com/doc/896f5237207d479ba5618d2666754d9a/10.0/en-US/How_to_Work_with_SAP_Business_O...

Here is payload of /rs/v1/LoadCR?DocCode=RCRI0001

{
    "error": false,
    "resultSet": [
        {
            "parameterType": "ReportParameter",
            "values": [],
            "defaultValuesDescription": {},
            "length": "131070",
            "isOptionalPrompt": "false",
            "description": "Items",
            "allowNullValue": "false",
            "isShownOnPanel": "true",
            "type": "xsd:string",
            "editMask": "",
            "minimumValue": "",
            "initialValues": [],
            "isEditableOnPanel": "true",
            "valueRangeKind": "Discrete",
            "allowMultiValue": "false",
            "name": "Title_Items@Title",
            "defaultValues": [],
            "currentvalues": [],
            "maximumValue": "",
            "allowCustomCurrentValues": "true"
        },
        {
            "parameterType": "ReportParameter",
            "values": [],
            "defaultValuesDescription": {},
            "length": "131070",
            "isOptionalPrompt": "true",
            "description": "Item No.",
            "allowNullValue": "false",
            "isShownOnPanel": "true",
            "type": "xsd:string",
            "editMask": "",
            "minimumValue": "",
            "initialValues": [],
            "isEditableOnPanel": "true",
            "valueRangeKind": "Range",
            "allowMultiValue": "false",
            "name": "Item@Select * from OITM",
            "defaultValues": [],
            "currentvalues": [],
            "maximumValue": "",
            "allowCustomCurrentValues": "true"
        },
        {
            "parameterType": "ReportParameter",
            "values": [],
            "defaultValuesDescription": {},
            "length": "131070",
            "isOptionalPrompt": "true",
            "description": "Item Group:",
            "allowNullValue": "false",
            "isShownOnPanel": "true",
            "type": "xsd:string",
            "editMask": "",
            "minimumValue": "",
            "initialValues": [],
            "isEditableOnPanel": "true",
            "valueRangeKind": "Discrete",
            "allowMultiValue": "false",
            "name": "Item Group@select \"ItmsGrpCod\", \"ItmsGrpNam\" from OITB",
            "defaultValues": [],
            "currentvalues": [],
            "maximumValue": "",
            "allowCustomCurrentValues": "true"
        },
        {
            "parameterType": "ReportParameter",
            "values": [],
            "defaultValuesDescription": {},
            "length": "131070",
            "isOptionalPrompt": "false",
            "description": "Enter Sep_item@separator:",
            "allowNullValue": "false",
            "isShownOnPanel": "true",
            "type": "xsd:string",
            "editMask": "",
            "minimumValue": "",
            "initialValues": [],
            "isEditableOnPanel": "true",
            "valueRangeKind": "Discrete",
            "allowMultiValue": "false",
            "name": "Sep_item@separator",
            "defaultValues": [],
            "currentvalues": [],
            "maximumValue": "",
            "allowCustomCurrentValues": "true"
        },
        {
            "parameterType": "ReportParameter",
            "values": [],
            "defaultValuesDescription": {},
            "length": "131070",
            "isOptionalPrompt": "false",
            "description": "Warehouse",
            "allowNullValue": "false",
            "isShownOnPanel": "true",
            "type": "xsd:string",
            "editMask": "",
            "minimumValue": "",
            "initialValues": [],
            "isEditableOnPanel": "true",
            "valueRangeKind": "Discrete",
            "allowMultiValue": "false",
            "name": "Title_Warehouse@title",
            "defaultValues": [],
            "currentvalues": [],
            "maximumValue": "",
            "allowCustomCurrentValues": "true"
        },
        {
            "parameterType": "ReportParameter",
            "values": [],
            "defaultValuesDescription": {},
            "length": "131070",
            "isOptionalPrompt": "true",
            "description": "Warehouse Code:",
            "allowNullValue": "false",
            "isShownOnPanel": "true",
            "type": "xsd:string",
            "editMask": "",
            "minimumValue": "",
            "initialValues": [],
            "isEditableOnPanel": "true",
            "valueRangeKind": "Discrete",
            "allowMultiValue": "true",
            "name": "warehouse@Select * from OWHS",
            "defaultValues": [],
            "currentvalues": [],
            "maximumValue": "",
            "allowCustomCurrentValues": "true"
        }
    ]
}

and here is rs/v1/ExportPDFData?DocCode=RCRI0001
 
Error code name:MissingParameterValues.


Channa_0-1712038099552.png

 

Accepted Solutions (1)

Accepted Solutions (1)

JWiseman
Active Contributor
0 Kudos

Hi Channa, I've never used this before...however, the payload below (and the payload from the API help guide) use "isOptionalPrompt": "false" and there is no value, i.e. "values": []

 

In the scheduler for SAP BI CR Server a schedule of a report, where there is a non-optional parameter and no value has been entered for that parameter, there will be an error of "Information is needed before this report can be processed." A schedule of the same report with a parameter value will be successful. In the report designer there is a similar, and expected behaviour.

 

Can you check to see if your reports do in fact have Optional Parameters or not and adjust your payload and retry so that non-optional parameters do have values. Let use know if that resolves the issue.

 

 

Channa
Explorer
0 Kudos

Thanks JWiseman,

I see the mistake that i have not passed name="@schema" for it.

Channa
Explorer
0 Kudos
Thanks JWiseman for your reply,

Answers (0)