Report Studio : Set Font for Date Prompts using JavaScript
Have you ever wondered how to set the font for a date prompt. Date prompts provided by Cognos do not have a Font property. Whe you design report prompt pages and set the font for all other objects and if you have date prompts for which Font is not set, it sticks out in your prompt page (if you know what I mean).
So here is a small script to help set the Font.
where the date prompt is named as FromDate.
So here is a small script to help set the Font.
<script>
var fW = (typeof getFormWarpRequest == "function" ?getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined)
{ fW = ( formWarpRequest_THIS_ ?formWarpRequest_THIS_ : formWarpRequest_NS_ );
}
var FromDateTextBox = fW.txtDateFromDate;
FromDateTextBox.style.fontFamily = 'Arial';
FromDateTextBox.style.fontSize = '8pt';
</script>
where the date prompt is named as FromDate.
No comments:
Post a Comment