8 Replies Latest reply: Feb 5, 2013 12:18 AM by 972094 RSS

    Change font size in standard report

    461615
      Hi all,

      Sometime small things can be very tricky in ApEx. I’ve been struggling to change the font size in a report. I’ve learnt that I can achieve this by Edit Report column and change the HTML Expression, for example:

      <span style ="font-family:Times New Roman;font-size:60%">#EMPNAME# </span>

      But one of my reports has more than 30 columns, it takes ages to change them one by one as you can imagine, also I don’t think it’s a proper way to do this. I guess I need to change my template. For example I am now using theme 12 standard report template. I’ve made a copy of the report template and rename it as Standard Smaller Font. I am new to CSS, how should I change the template to make the report apply a predefined font class?

      I have created demo on my workspace, please feel free to take a look at:

      http://apex.oracle.com/pls/otn/f?p=4550:1:919023757986432

      workspace: CAN
      user name: demo
      password: demo

      Thanks very much for your time and help.

      Pete
        • 1. Re: Change font size in standard report
          357241
          Hello,

          Add this to you page template or page header.
          <style>
          .t12standard tr td {font-size:9px;}
          </style>
          If you just starting out with CSS I suggest you spend an hour or two going through this site [http://www.w3schools.com/Css/default.asp] it will teach you the basics of CSS and how to use it and save you countless hours later.

          Regards,

          Carl


          Regards,
          Carl
          • 2. Re: Change font size in standard report
            461615
            Hi Carl,

            Thanks very much for your help. It works on my report data, apart from the report column header. Can you let me know which class I need to change? I added the following code into the column heading section in my template.

            <style>
            .t12header th {font-size:7px;}
            </style>

            or

            <style>
            .t12standard th tr td {font-size:7px;}
            </style>


            Nothing happened. the detail can be found in my workspace. I am going through the CSS document now, thanks once again.

            Kind regards,
            Pete
            • 3. Re: Change font size in standard report
              fac586
              th.t12header {
                font-size: 7px;
              }
              or if sorting is applied with header links
              th.t12header a {
                font-size: 7px;
              }
              as there's a more specific rule on the links.

              Can you actually read 7px text? :-)

              Note that for various reasons it's best to avoid specifying screen font sizes using px or pt: use relative units like em or %.

              SelectORacle is a tool that will explain your CSS selectors in plain language.

              Edited by: fac586 on Sep 2, 2008 12:48 PM
              • 4. Re: Change font size in standard report
                461615
                Carl and Paul,

                That works great! Thanks for your time and help.

                Best regards,
                Pete
                • 5. Re: Change font size in standard report
                  461615
                  Hi Carl,

                  Just a suggestion, sorry if I am talking nonsense here. For the basic functions like changing font size or color or formatting the page layout, should the ApEx provide a user interface for us? As a developer, we may want to be more concentrating on PL/SQL stuff, developing backend packages or so.

                  Thanks and regards,
                  Pete
                  • 6. Re: Change font size in standard report
                    357241
                    Hello,
                    For the basic functions like changing font size or color or formatting the page layout, should the ApEx provide a user interface for us
                    This comes up from time to time and we always seem to come back to no. We could come up with an interface but to do so would have to constrain the type of HTML and formatting a developer could use to make it generic. Or we can let you have the full power of HTML and CSS and allow you to build anything you want.

                    For people that don't care about formatting we have our built in themes and templates which many people use successfully and never touch.
                    For people that care about formatting there is the power to hand build your whole theme with standard internet technologies.
                    And in you case you wanted to change the just the font size of the report you have to learn 2 lines of CSS which will help you in any web environment.

                    Regards,
                    Carl

                    blog : [http://carlback.blogspot.com/]
                    apex examples : [http://apex.oracle.com/pls/otn/f?p=11933:5]
                    • 7. Re: Change font size in standard report
                      461615
                      <div class="jive-quote">
                      For people that don't care about formatting we have our built in themes and templates which many people use successfully and never touch.
                      For people that care about formatting there is the power to hand build your whole theme with standard internet technologies.
                      </div>

                      That make perfect sense, thanks Carl.
                      • 8. Re: Change font size in standard report
                        972094
                        thank you very much for giving me such important information