This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jasperreport print problem

 
ritesh solanki
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Hi Folks,
>
> I am finding a small trouble while printing the entire contents of an
> Iframe which carries an html report which is in turn generated by
> jasper reports.s
>
> Hear is the javascript code used to print the contents of the Iframe
>
> function Print(reportframe)
>
> {
>
> reportframe.focus();
>
> reportframe.print();
>
> }
>
> And hear is the Jsp code used to render the html report generated by
> jasper inside an iframe
>
> <TR>
>
> <td>
>
> <div><iframe id = "reportframe"
>
> src="<%=request.getContextPath() %> /report.html�
>
> WIDTH=1200
>
> HEIGHT=320>
>
> </iframe>
>
> </div>
>
> </TD>
>
> </TR>
>
> When I invoke the print option using javascript this is what I got
>
> Problem:
>
> The printed page carried only one half of the page contents compared
> to what was shown on the browser, but the actual content is more than
> a page.
>
> For example if the browser page was carrying10 columns on it, the
> printed page carried just 5 columns on the page.
>
> What�s expected?
>
> The first 5 columns must be printed on the 1^st page and the rest 5
> must be followed up on page 2.
>
> It would be more favorable if you could tell me how jasper reports are
> being printed on client server architecture is using a small example
> or code snippet.
>
> Thanks and Regards,
>
> **Ritesh Solanki**
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Printing HTML pages happens completely in the browser. Whether the pages were created by JasperReports or any other way makes no difference.

I'll move this to the HTML/JavaScript forum, where the client-side experts hang out.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's with the the ">" angle brackets?

Also, please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
[ July 07, 2008: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic