Notifications
Announcements
No record found.
How to change font for the CRM Print Preview?
*This post is locked for comments
AFAIK, there is no supported way of changing font for Print Preview.
Nothing supported, but just for experiment:
Open a html web resource to following URL :
Xrm.Page.context.getClientUrl() + "/_forms/print/print.aspx?allsubgridspages=false&formid=" + Xrm.Page.ui.formSelector.getCurrentItem().getId() + "&id=" + Xrm.Page.data.entity.getId() +"&objectType=" + Xrm.Page.context.getQueryStringParameters().etc;
then change fonts as you like:
document.body.style.fontFamily = "Impact,Charcoal,sans-serif";
End result:
Hello Sugar,
There is no supported Aut of the Box way to do this.
Hi Sagar,
I agree with Magor, there is no supported way to do this. My post above was just an experiment.
Hi Deepesh,
I was able to open a html web resource for the print preview... But it didn't change the font.
var printPreview = window.open(Xrm.Page.context.getClientUrl() + "/_forms/print/print.aspx?allsubgridspages=false&formid=" + Xrm.Page.ui.formSelector.getCurrentItem().getId() + "&id=" + Xrm.Page.data.entity.getId() + "&objectType=" + Xrm.Page.context.getQueryStringParameters().etc, null, "menubar=1,resizable=1,width=600,height=800");
printPreview.document.body.style.fontFamily = "Impact,Charcoal,sans-serif";
printPreview.document.body.style.fontSize = "60pt";
Am I missing something?
Did you try pointing an iframe inside html webresource with the url and on load put a font style?
However, I only did it as an experiment and this is not a recommended approach for live system
nope i'm not using an iframe... im only using window.open to open the print preview url...
but when i tried to control the font with
document.body.style.fontSize = "60pt";
it still didn't change.
I decided to create custom report instead...
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2