web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Change font for CRM Print Preview

(0) ShareShare
ReportReport
Posted on by

How to change font for the CRM Print Preview?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mamatha Swamy Profile Picture
    5,426 on at

    AFAIK, there is no supported way of changing font for Print Preview.

  • Suggested answer
    Deepesh161 Profile Picture
    6,317 on at

    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:

  • Suggested answer
    Magor Kovacs Profile Picture
    1,835 on at

    Hello Sugar,

    There is no supported Aut of the Box way to do this.

  • Suggested answer
    Deepesh161 Profile Picture
    6,317 on at

    Hi Sagar,

    I agree with Magor, there is no supported way to do this. My post above was just an experiment.

  • Community Member Profile Picture
    on at

    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?

  • Deepesh161 Profile Picture
    6,317 on at

    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

  • Community Member Profile Picture
    on at

    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.

  • Community Member Profile Picture
    on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans