Home » Developer & Programmer » Reports & Discoverer » How to adjust two pages reports shrink to fit one page in report printing ( report 6i)
icon5.gif  How to adjust two pages reports shrink to fit one page in report printing [message #283361] Mon, 26 November 2007 23:02 Go to next message
bubblekitty
Messages: 3
Registered: November 2007
Junior Member

Hello Everyone,


I have a two pages or more pages reports (I think it will not over 3 pages), I try to put the pages report shrink to fit one-page in printing, the function just like Microsoft office EXCEL sheet printing own.

I have none idea to solve it...
Is there anyone have good way to work around for this ?

Thanks And Regards
Kitty
Re: How to adjust two pages reports shrink to fit one page in report printing [message #283379 is a reply to message #283361] Tue, 27 November 2007 00:09 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The only way is to use smaller font size (as far as I can tell).

Or, if possible, use a larger paper size (A2 instead of A4, for example). But that would probably require a plotter, not a printer.
icon9.gif  Re: How to adjust two pages reports shrink to fit one page in report printing [message #283418 is a reply to message #283379] Tue, 27 November 2007 01:55 Go to previous messageGo to next message
bubblekitty
Messages: 3
Registered: November 2007
Junior Member

Littlefoot,

Thanks a lot for your reply...

I have used smaller font size...

I feel it too bad that there is no program way to shrink much more pages fit into One page...
Re: How to adjust two pages reports shrink to fit one page in report printing [message #283426 is a reply to message #283418] Tue, 27 November 2007 02:14 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps there is a way, but I don't know anything about it.
icon6.gif  Re: How to adjust two pages reports shrink to fit one page in report printing [message #283653 is a reply to message #283426] Tue, 27 November 2007 20:36 Go to previous messageGo to next message
bubblekitty
Messages: 3
Registered: November 2007
Junior Member

I find a solution like follows,but don't know how to make it work in Reports Builder 6i :
------------------------------------

One Page Only Please

Tim Dexter

Got this great question today ...

Is it possible to check whether a document generated by BI publisher fits 1 page?
If it's more than one page then we want to reduce the font until it fits on a single page.

Its a nice question to which I can quickly answer 'yes - potentially' - but before I could really say 'yes' thou, I needed to put my money where my mouth was and prove it. Finally, I have put together 10mins here and there to get something that works. Its a simple approach and will probably need some more work for production but the solution shows off some of the APIs we have and how they can be used to solve this problem.


Getting the answer to the first part can be done quite simply but only after the final document has been created. Sadly, you can not use a nice 'if' statement in the template to check if you have more than one page and if so then reduce the font size until it fits. Page numbers can not be determined until the rendering engine has done its stuff and laid the data on the page. So it has to be a post generation check.

We need a flow such as

1. Set font size to X
|
2. Generate Output
|
3. Test page numbers
|
4. If page number > 1
|
5. Set font size X=X - 2 or some other number
|
6. Goto 2

7. else End

...
It seems quite a niche requirement but if you need this type of functionality then the APIs and an XML parser can help. I could even see the need to manipulate the template repeatedly for other requirements. I chose a DOM paerser because templates are not that big. It would not be a huge task to move this over to SAX.
Re: How to adjust two pages reports shrink to fit one page in report printing [message #283716 is a reply to message #283653] Wed, 28 November 2007 00:45 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Now that's a solution! Set font size to 10, run the report. If it is larger than one page, go back to Paper Layout, change font size to 9 and run report again. If it is still too large, ./fa/1597/0/.

Did you consider choosing another tool for your requirement? I can't suggest any reporting software, sorry ... but someone might know it!

Though, there was a topic about converting report output to Excel. A readme.txt file might help (perhaps). Because, once you get your data into Excel, you'll be able to "Fit it to page" and print.
Previous Topic: Report Style
Next Topic: 2 query
Goto Forum:
  


Current Time: Fri Dec 09 21:09:39 CST 2016

Total time taken to generate the page: 0.13287 seconds