This is a migrated thread and some comments may be shown as answers.

Fill report in codebehind and print

4 Answers 229 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Koen L
Top achievements
Rank 1
Koen L asked on 17 May 2010, 02:44 PM
I'm new to this great product and i am wondering if it is posible to fill a report and print it from codebehind.

We use webforms. I am thinking to create a order, then add the end of the order on "Make Order". The user has selected a outputtype. This can be email, print, ... . When he selects print i would like to fill in the report template that we can make with this report tool and send to a printer. Basicly send the pdf that the telerik reporting viewer can make. But i don't need the report viewer on this webform. I just wanne use its functionality to fill in the template and print a pdf file.

Thanks :)

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 May 2010, 12:59 PM
Hi Koen L,

On the client side you can invoke the print through the ReportViewer client object's PrintReport() method and hide the Web Report Viewer by setting its style to "display:none" 


For more information and code snippets check out the How to print report on client mashine without showing the report help article.

Kind regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Andy
Top achievements
Rank 1
answered on 07 Jun 2010, 04:50 PM
Hi,

I am using the code that is given in the demo. BUT it doesnt seem to work when I set display:none.

When I try it without the "display:none", it works fine.

Any idea why???

Andy
0
Andy
Top achievements
Rank 1
answered on 07 Jun 2010, 04:58 PM
Solved the problem by setting style="width:1px; height:1px; overflow:hidden". Does throw up a weird color pixel, but nothing too bad.

Now here is the kicker..... the report I am generating has 5 pages, but the printer only prints the first page. How can I get all 5 pages to be printed?

Andy
0
Steve
Telerik team
answered on 08 Jun 2010, 08:55 AM
Hello Andy,

Most likely you either do not have Acrobat Reader installed on your machine (required for true printing) or its plug-in is not enabled in the browser - please install/enable it and try printing again. When the Acrobat PDF plug-in is not detected, the web viewer would use the default browser print capability, which prints only the data available on the current screen along with the URL from which it came and this is expected.

Regards,
Steve
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Koen L
Top achievements
Rank 1
Answers by
Peter
Telerik team
Andy
Top achievements
Rank 1
Steve
Telerik team
Share this question
or