COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bioCam on 02 Nov 2010 12:17:12 PM

Title: How to make the custom BUTTON look and feel the same as the default created.
Post by: bioCam on 02 Nov 2010 12:17:12 PM
I have to validate prompt data before submitting it to the report.  To do so, I replaced the default 'Finish' button with my own HTML code.  There is the existing 'Cancel' default button.  Both buttons 'Cancel' and 'Finish' buttons look and feel is different.  The HTML 'Finish' button box is larger and text size is bigger. Do you know how I can make the HTML button the same as the default?  Thank you.

'---- default Finish button ------
<promptButton type="finish">
<contents/>
<style><defaultStyles><defaultStyle refStyle="bp"/></defaultStyles></style>
</promptButton>

'---- HTML Finish button ------
<HTMLItem><dataSource><staticValue>
<input type="BUTTON" class="clsPromptButton" onClick="checkSel()" value="Finish>
</staticValue> </dataSource></HTMLItem>
Title: Re: How to make the custom BUTTON look and feel the same as the default created.
Post by: mrcool on 02 Nov 2010 05:59:06 PM
Hi Jing,

I have a small suggession but it could be wrong.Did you try applying the same class to the button you have created.
Title: Re: How to make the custom BUTTON look and feel the same as the default created.
Post by: bioCam on 03 Nov 2010 09:06:06 AM
Hello mrcool,

I did think about the class but not sure how to use it.  I am looking for examples but so far have not found any.  Appreciate your advise. 

Thank you.
Title: Re: How to make the custom BUTTON look and feel the same as the default created.
Post by: cognostechie on 03 Nov 2010 12:07:31 PM
If nothing works, you can always drop a Text Box on top of the buttons, make the buttons invisible by the Background and Foreground color properties and make the Text Box visible. Set the height and width properties of the Text Box to be the same for both of them.
Title: Re: How to make the custom BUTTON look and feel the same as the default created.
Post by: kattaviz on 09 Nov 2010 08:27:20 AM
Hi Jing,

Try to format your HTML button as follows. Foloowing is the button code i used.

<input type="BUTTON" class="clsPromptButton" onClick="validateDate()" value="Submit"
style="color:#223A94;font-weight:bold;font-size:8pt;width:100px;border:1.5pt solid #223A94">

HTH