COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: jimvision on 31 Jul 2015 04:19:52 PM

Title: Report Studio - Indent 2nd line on Word Wrap
Post by: jimvision on 31 Jul 2015 04:19:52 PM
Hi Everyone

Is there a way to indent the second line of a string variable?  I've seen posts on cross tabs but this is just a string variable.  I'm very green to Cognos reporting.

We're using Cognos 10.1.1 Report Studio to create college transcripts.  The variable in question is the course name.  Course names can get quite lengthy and their are 2 columns on a page and other variables competing for space, like grades.

Example:  Lets say the course name is BIO 361 Molecular & Classical Genetics in Mammals and the column width is 20 characters.  I need to indent the 2nd and subsequent lines.


BIO 361 Molecular &
   Classical Genetics
   in Mammals


Is there a way I can do this with Conditional formatting? 

Many thanks for any advice

Jim
Title: Re: Report Studio - Indent 2nd line on Word Wrap
Post by: bdbits on 03 Aug 2015 10:29:37 AM
HTML Items with embedded CSS can do this. You can use negative values with text-indent and margin, for example you could use a 70px margin and -70px text-indent.

Surround your data item with HTML Items, in the first use <div style="margin: 70px; text-indent: 70px;"> and in the second close the div with </div>.
Title: Re: Report Studio - Indent 2nd line on Word Wrap
Post by: nsaxena on 04 Aug 2015 07:28:10 AM
Hi All ,

Can you share the xml of above change...will be helpful.

Thanks!
Title: Re: Report Studio - Indent 2nd line on Word Wrap
Post by: bdbits on 04 Aug 2015 02:49:01 PM
Just apply what I said in the second paragraph. You may need to unlock the data container to put the HTML Items around your data item.