i am saving the report from report viewer
I have using the script to save data in pdf and excel
format = event.source.parent.getComponent('Dropdown_Format').selectedStringValue
window = system.gui.getWindow("EMS/EMS_Dynamic_Report")
if format == "PDF":
window.getComponentForPath("Root Container.Report Viewer").saveAsPDF("Daily Report")
if format == "Excel":
window.getComponentForPath("Root Container.Report Viewer").saveAsXls("Daily Report")
But when i save the file in excel format i am getting black rectangle box in excel
only i am getting this issue in excel format. PDF format getting data fine
any change need to be done in script?
can any one help me out
This is probably not an issue with your script, but an issue with the reporting module’s export format. What version of Ignition are you using?
Ignition platform - 8.1.7
Reporting module - 6.1.7
Is there any way to fix it?
I have no idea, because I don’t know the nature of the problem.
Are you embedding some kind of background image in the report? Where is it coming from?
In Excel, can you select the black square and delete it; i.e. is it arriving as a separate overlaid component in Excel?
Yes its coming separate overlaid. When i delete it i can able to see tha data
This issue is not happening when i right click the report component and choose excel format.
That time i am not getting any issue
Oh, good news. Try changing your code to call
saveAsXlsx, instead of
saveAsXls. You’re inadvertently using ‘legacy’ exporting code.