Customizing tool tip fonts in Open Source BIRT Reports
Currently, in Open Source BIRT reports there is no way tool tip can be customized. The default font size could be too small for all users. However, it cannot be changed from the UI. This tip explains how to use the QTip libraries to integrate custom tool tip in BIRT Reports so that so that the font size and other properties can be customized as needed for business requirements.
Comments
-
Integration requires the following Qtip library and CSS( stylesheet)
jquery.qtip.min.js
jquery.qtip.min.cssThese libraries can be downloaed from the following location:
http://qtip2.com/downloadNote: While downloading the libraries makes sure "Viewport adjustment" is seleced from "Choose additional features".
This feature is required to auto adjust the tooltip based on the window location
Steps to integrate the QTip libraries in BIRT
Add the libraries and stylesheet to the BIRT report using head.js function in clientInitialize event under clientscripts.
clientScripts event can be accessed from the top of the reports.head.js( "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js", function() { jQuery.noConflict(); jQuery(function ($) { head.js("https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.qtip.min.css", "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.qtip.min.js", function() { console.log("Done loading all"); //debugger; }); }); });
Add a Text element in the Table header with the following JavaScript. This script goes through all DIV elements with
class "qtiptext" and applies the QTip properties defined in library and stylesheet
<script> console.log ('report starting 0...'); jQuery('.qtiptxt').each(function($) { console.log ('report starting 1...'); jQuery(this).qtip({position: {viewport: jQuery(window)}}); }); </script>
3. Add Text elements with text set to HTML as needed. Add the below code and update as per the requirement.<DIV id="test1" href="#test" class="qtiptxt" title="The unique number of clients processed during the selected time period. Clients do not get counted more than once regardless of meeting count."> Total Unique Clients Meetings </DIV>
Here "Total Unique Clients Meetings" is the text that will be displayed in report and text in title which is "The unique number of clients processed during the selected time period. Clients do not get counted more than once regardless of meeting count." will be displayed when the mouse is mover over the Text.Raj Jawahar
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management