COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: andregomes on 13 Feb 2017 10:38:06 AM

Title: Reports in diferentts screens - auto adjust
Post by: andregomes on 13 Feb 2017 10:38:06 AM
Good afternoon people,

I have an analysis that I need to see on different screens of monitors, but the graphics do not fit the screens of different resolutions. How do I make this report automatically adjust to any resolution I use?
Title: Re: Reports in diferentts screens - auto adjust
Post by: AnalyticsWithJay on 13 Feb 2017 12:18:17 PM
You'll have to use percentages instead of pixels for your widths in order for your report to automatically adjust.
Title: Re: Reports in diferentts screens - auto adjust
Post by: andregomes on 14 Feb 2017 06:42:17 AM

Exactly, but there are still problems with chart size and lists. What I would like to do is capture the screen resolution and adjust the report. I read that it has how to do in javascript in the cognos SDK. Anyway thanks for the reply.
Title: Re: Reports in diferentts screens - auto adjust
Post by: Invisi on 14 Feb 2017 08:14:06 AM
You say analysis... Is this made in Report Studio or are you talking about Analysis Studio?
Title: Re: Reports in diferentts screens - auto adjust
Post by: AnalyticsWithJay on 14 Feb 2017 09:29:20 AM
Quote from: andregomes on 14 Feb 2017 06:42:17 AM
Exactly, but there are still problems with chart size and lists. What I would like to do is capture the screen resolution and adjust the report. I read that it has how to do in javascript in the cognos SDK. Anyway thanks for the reply.

If it's possible to provide a screenshot, it would be easier to provide suggestions. You could place data containers in blocks, specify a height and width property on the block, and specify the overflow property so it uses scrollbars within the block.

What you're looking for in Javascript is possible, but I'd have to see the layout before I can make suggestions.

Title: Re: Reports in diferentts screens - auto adjust
Post by: Invisi on 15 Feb 2017 08:40:58 AM
When your 'analysis' is static, a trick may be to create it in a PDF and have people consume the PDF on their device. Then it scales to their device automatically.
Title: Re: Reports in diferentts screens - auto adjust
Post by: CognosPaul on 15 Feb 2017 02:01:18 PM
Cognos is terrible at responsive design. The question is really how much effort do you want to put into it? You can use HTML items to create a responsive design, but that requires a fair amount of web development experience. If you're willing to put in the effort, there are a few things you can do.

1. Make multiple versions of the same graph with different sizes, wrapped in divs. Use JS to unhide the correct div based on the screen size.
2. Use a third party graphing engine that can draw the graph on the fly so you can reset the size.
3. Simple bar graphs can be done with clever styling of divs in an HTML item.
4. Use floating divs (blocks) for responsive design.

In cases like this it's often best to agree upon a minimum resolution and work up. Remember, in general the more clever the report design the harder it is to maintain.