If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to display Image Header and Footer only on First Page

Started by cvamarley, 07 Apr 2015 11:28:30 AM

Previous topic - Next topic

cvamarley

Hi there,

This is my first post in Cognoise.com

Report Format : PDF
Data Source : Relational

The Report contains set of notices for each group.The requirement is to display Image header and Footer only on the first page for each notice of a group.

I have tried following solution :

1.Set pagination property at Report pages level. Reset Page count to 1 and Reset Page number to 1. However, the Page numbers were being displayed correctly(Page number as 1 for each group) when i added a Layout calculation But, when I try using render variable with Boolean variable set as PageNumber() = 1 for header and footer.Its not working as expected..Headers and footers were not being disiplayed in any of the pages. Tried Style variables, Conditional styles instead of Render variable.Tried placing images in a table and without table. Still I couldn't achieve the target.

The next possible solution I thought of is, to place the header and footer in Body. The approach is working correctly when I place in body but footer cannot always span to bottom. That's the problem.

I think, the final solution is to make use of JavaScript but i'm not aware of how to call report page using JavaScript.

Any help is much appreciated.

Please do not hesitate to share any links if you feel useful for implementation.

Thanks in Advance!


cvamarley

Bump..

Got to know that JavaScript wouldn't work for PDFs..Still on search for a solution !

BigChris

I seem to remember Lynn coming up with a very nice solution for something along these lines...let me take a look

BigChris

Nope - can't find it, but I'll keep looking. From memory, it went something along the lines for creating two pages for your report. On the first page you add in the header and footer information that you want, then work out the number of records that will show on your first page. Then you create a row count and render the first page where the row count is less than that number, and the second page when it's greater. I might not have worded that as clearly as I might like, but I wanted to get a reply in whilst I remembered...

Michael75

@ Chris

Is this the post from Lynn you were thinking of?

http://www.cognoise.com/community/index.php/topic,18978.msg56246.html#msg56246

It contains some of the elements of the current request.

cvamarley

Thanks a lot BigChris,Micheal75 for taking time to look into my problem.

I looked into the thread which Micheal75 referred to but unfortunately, the problem is different here..We cannot guess to how many pages a notice can flow to

Consider the following scenario :

Notice A for Group X may flow to just 1 page,Notice B for Group Y might flow to 3 Pages..we need to display image header and footer only on the first page in both the cases..

I have set pagination property as Reset Page Count to 1 and Reset Page Number to 1 at Page level

Since the report has been set page breaking by Group..I could get Page Numbers correctly i.e, Page number gets reset for every group..

Report expressions are only working for Text header and footer when we use a If statement..

I found the same problem in the following post but user was able to resolve cos its Text header

http://www.cognoise.com/index.php?topic=23455.0

CognosPaul

Can you describe how the report is built? Is it essentially a big list? A page set?

Actually, it doesn't matter too much. Create a list associated with a new query. Drag in a query item with the expression 1. Although it could be 2. Or even '1'. Add an overall header to the list. Then set the title and list column body to box type none. Unlock your report and add the images to the overall header.

The hard bit would be if you needed it on page 2. I really hope nobody asks for that.

Take a look at the attached report.

cvamarley

First of all...Thanks for the Suggestion, CognosPaul!

Sorry for the late reply,I just checked the messages

The report is built with multiple lists cascaded into tables and yes, there's a page set as well in the report.

This approach might work for Overall Header but we should also display an image in footer. It may not display the footer image at the bottom of the page every time if we follow the approach. Please let me know if I'm wrong.



CognosPaul

You can put the list containing the image anywhere on the page, including other lists. Does that help?