COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: davidsoc on 01 Nov 2005 08:47:06 AM

Title: [Solved] Creating Custom Toolbox Items For Report Studio
Post by: davidsoc on 01 Nov 2005 08:47:06 AM
I have created a new toolbox item by editing the standardcomponents.xml and toolbox.xml files in the \crn\webcontent\pat directory.

The changes i have made work OK apart from one small problem. The item itself is a table of 2 columns and 9 rows. It has text items that i have changed the font, color etc for and i have placed these in rows 1,3,5,7,9. In rows 2,4,6,8 i have put in a text item with 5 space characters (to ensure the gap is present in final report).

The problem i have is that when i drag the new item into a report the blank text items appear as "Double click to edit text". This is standard behaviour for an item without any text i know... but these items have 5 spaces in the StandardComponents.xml file (report spec attached)

Has anyone had any experience of creating toolbox items or of how Report Studio reads the xml specification?

It seems to ignore the spaces bewtween the <text> tags. I've tried using &nbsp; etc but with no luck... the xml parse fails.

<report xml:lang="en-gb" xmlns="http://developer.cognos.com/schemas/report/1/"><!--RS:1.1-->
<layoutList>
<layout>

<pageSet>

<page name="Page1">
<pageBody><table>
<tableRow><tableCell><style><CSS value="padding:5px;vertical-align:top;text-align:left"/></style><textItem><text></text><style><CSS value="font-size:12pt;font-weight:bold;text-decoration:underline;color:#002868"/></style></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px"/></style><textItem><text>Ã,  Ã,  Ã, </text></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px;vertical-align:top;text-align:left"/></style><textItem><text></text><style><CSS value="font-size:12pt;font-weight:bold;text-decoration:underline;color:#002868"/></style></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px"/></style><textItem><text>Ã,  Ã,  Ã, </text></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px;vertical-align:top;text-align:left"/></style><textItem><text></text><style><CSS value="font-size:12pt;font-weight:bold;text-decoration:underline;color:#002868"/></style></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px"/></style><textItem><text>Ã,  Ã,  Ã, </text></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px;vertical-align:top;text-align:left"/></style><textItem><text></text><style><CSS value="font-size:12pt;font-weight:bold;text-decoration:underline;color:#002868"/></style></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px"/></style><textItem><text>Ã,  Ã,  Ã, </text></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<tableRow><tableCell><style><CSS value="padding:5px;vertical-align:top;text-align:left"/></style><textItem><text></text><style><CSS value="font-size:12pt;font-weight:bold;text-decoration:underline;color:#002868"/></style></textItem></tableCell><tableCell><style><CSS value="padding:5px"/></style></tableCell></tableRow>
<style>
<CSS value="border-collapse:collapse"/>
</style>
</table>
</pageBody>
</page></pageSet></layout>
</layoutList>
</report>

Title: Re: Creating Custom Toolbox Items For Report Studio
Post by: pmcghiey on 01 Nov 2005 02:06:15 PM
I know that a lot of xml parsers will ignore spaces between tags if there are not any other characters between them.Ã,  The same is true for html.Ã,  The & character is reserved in the xml/xslt world.Ã,  The equivalent for &nbsp; in xml is &#160;
Title: Re: Creating Custom Toolbox Items For Report Studio
Post by: davidsoc on 02 Nov 2005 02:44:04 AM
Thanks... used &#032; to enforce the spaces.

Many thanks again

Topic solved