function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matthew Hayes 46Matthew Hayes 46 

Error when exporting reports

Some users get the following error when trying to export reports:

uncaught Error in $A.getcallback() [Cannot read property 'getBoundingClientRect' of null] 

Any idea what might be causing this?
Best Answer chosen by Matthew Hayes 46
SwethaSwetha (Salesforce Developers) 
HI Matthew,
Based on the error I believe there is a custom lightning component involved  and a call like getElement().getBoundingClientRect() is made.

This error generally means you are trying to use a property on something that is null. Make sure you have an object to operate on before trying to use the property. I.e getBoundingClientRect expects a dom element.

You might need to loop in a member of the development team for reviewing the code to understand why specific users are affected.

See related posts: https://salesforce.stackexchange.com/questions/236060/getboundingclientrect-does-not-work-in-lightning-component

https://stackoverflow.com/questions/33276423/what-does-the-uncaught-typeerror-cannot-read-property-js-error-mean

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.