Using IcCube reporting V8, I created via the ic3-reporting-api a theme containing a landscape layout.
}, {
layoutConfigId: 'My. A4 (Landscape) Layout',
pageSize: {
type: "known",
name: "A4",
},
pageOrientation: "landscape",
pageMargin: {
sizeUnits: "cm", ...
then created a report based on this layout (which shows correctly as landscape in reporting), and added on it a print button defined as :
action, action@appNotificationType, action@appNotificationPayload
Générer un PDF landscape,print-report,"{""paperSizeName"":""A4"",""pageOrientation"":""landscape"",""fileName"":""Tableau de bord Salle A Landscape (@{DateSelected:asCaption}).pdf""}"
Générer un PDF layoutId,print-report,"{""paperSizeName"":""A4"",""layoutId"":""My. A4 (Landscape) Layout"",""fileName"":""Tableau de bord Salle A Landscape (@{DateSelected:asCaption}).pdf""}"
I tried to set as parameters pageOrientation and layoutId because I saw while debugging pageOrientation was set to portrait and layoutId to undefined But my parameters are not considered at all :
01:31:05.276 [General] print options
Object { inBrowser: false, withState: true, appUrl: "https://localhost:44361/icCube/report/editor", appLocalUrl: "dft", appCustomizationUrl: "-", timeoutS: 300, debugWaitingTimeS: 900, layoutId: undefined, fitToPage: true, fileName: "Tableau de bord Salle A Landscape (2021 nov.).pdf", … }
appCustomizationUrl: "-"
appLocalUrl: "dft"
appUrl: "https://localhost:44361/icCube/report/editor"
debugWaitingTimeS: 900
fileName: "Tableau de bord Salle A Landscape (2021 nov.).pdf"
fitToPage: true
inBrowser: false
layoutId: undefined
marginBottom: 0
marginLeft: 0
marginRight: 0
marginTop: 0
pageHeight: 297
pageOrientation: "portrait"
pageSizeName: "A4"
pageSizeUnits: "mm"
pageWidth: 210
scale: 1
Unfortunately, this is currently not available.
A new optional field will be added to the action@appNotificationPayload
datasource column: paperOrientation: "portrait"|"landscape"
. By the way the field layoutId
mentioned in the question is not available and will be ignored. The layout of the report cannot be changed when printing the report.
The documentation will be updated accordingly when the new version is available with the fix.