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

print my report straight to printer

11 Answers 856 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric Chiang
Top achievements
Rank 1
Eric Chiang asked on 17 Jun 2007, 08:18 AM
Dear,

 How can I print my report straight to printer.

Best Regards,
Eric

11 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 18 Jun 2007, 08:09 AM
Hello Eric,

Currently we do not allow printing a report programmatically. This functionality will be available in the next version.
 

Best wishes,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Chris Castle
Top achievements
Rank 1
answered on 01 Nov 2007, 10:34 PM
When is this expected to be released?
0
Rossen Hristov
Telerik team
answered on 02 Nov 2007, 01:21 PM
Hi Chris Castle,

It will be released mid December.

Best wishes,
Ross
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
MarkInTexas
Top achievements
Rank 1
answered on 07 Nov 2007, 06:20 AM
Ross,
Can you elaborate more on the features of printing in the next version?

We currently use RadControls for ASP.NET and are researching our Reporting options.

Some things we need to be able to do programmatically :
1) Retrieve a list of printers client side. Ideally the user would configure certain printers for specific reports. For example, the user should be able to select a printer for "Labels" and a different printer for "Reports". This information would then be stored in the database on the server side.
2) User selects a report which could be a report or label. And using the stored configuration information (1) above the report would be printed to the correct printer.
3) Also need program control of the printing of the report - page layout, number of copies, number of copies, pages etc...

Will the next release of Telerik  Reporting support the above functionality?

Very interested if it will.  In fact, if a Beta version exists how do we get it for testing?

Thanks,
Mark.



0
Svetoslav
Telerik team
answered on 07 Nov 2007, 01:55 PM
Hi Mark,

Actually since the last update of Telerik Reporting - Q2 2007 SP1 - we have introduced an API for printing reports. Please check out the ReportProcessor.Print() method.

Correct me if I am wrong but from your description it seems that you need an API for printing reports in a web application on the client side - that is the browser. The only possible way to print a report through the web report viewer is to use the built-in printing functionality. It depends on the Adobe Acrobat Reader PDF plugin (you need it installed to take the advantages of the true print and not the browsers' printing capabilities) and you have all the options to select a printer from a list.

On the client side you can invoke the print through the ReportViewer client object's Print() method like in the code snipped below:

<form id="form1" runat="server">
    <div>       
        <telerik:ReportViewer runat="server" id="ReportViewer1" Height="550px" Width="725px"></telerik:ReportViewer>
    </div>                       
   
    <script type="text/javascript">
        <%=ReportViewer1.ClientID %>.Print();
    </script>       
</form>


This is the only possible thing you can do on the client side - there is no possible way to list the available printers, etc. All of this is done through the Adobe plugin.

Regarding the programmatic control over the printing - such is not publicly available and this is by design. The only reason for this is that one have to specify the report layout and appearance through the report definition and not while the report is rendered. Moreover, you have unlimited number of export formats (rendering formats are pluggable to the reporting engine) and all formats have specific paging and rendering.

Until now we have not released a Beta of Q3 2007 version yet.

Greetings,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
MarkInTexas
Top achievements
Rank 1
answered on 07 Nov 2007, 03:26 PM
Thanks for the quick response and answers.

I was afraid that is what you would say about obtaining a printer list on the client side. And while I agree it is not easy surely it can be done. Adobe does it (activex control perhaps?) and so there is a way. I guess I will good take a look at Adobe PDF API and developer tools.

Other option : Lets say the user has to manually enter a list of printers and what reports are associated with that printer.
Can I "Print" to a specific printer? ReportProcesser.Print("PrinterName"); // ???

Do you know when the Roadmap for the next version of Reporting will be updated. Sure would like to know the other features in the release.

I really like using the Telerik controls and naturally I would like to continue this trend by using the T. Reporting.

Thanks again,
Mark.
0
Svetoslav
Telerik team
answered on 08 Nov 2007, 07:36 AM
Hello crownmark,

We decided using the Adobe plugin because of it is widespread and almost any computer has it installed and we already have the PDF rendering engine working. The other possible option was (is) own printing ActiveX but this technology is limited to Internet Explorer only and developing similar plugins for the other browsers will be hard and time consuming task that requires serious effort that we can't afford at the moment.

To specify the printer which ReportProcessor.Print() to use you use the PrinterSettings object that you have previously created for the printer you want. To learn more about PrinterSettings class please refer to this topic.

Usually we update the product roadmaps on release-to-release basis which means that after we are done with the upcomming Q3 release the new information will be published. What the Q3 version will add you can read from here.

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John Giblin
Top achievements
Rank 1
answered on 07 Sep 2008, 06:35 PM
I tried use the client side approach you have:
       <%=ReportViewer1.ClientID %>.Print();

But that didnt work. I do have the the adobe plugin installed.

any ideas?

0
Steve
Telerik team
answered on 08 Sep 2008, 08:47 AM
Hi John,

We've made some changes in the Web ReportViewer client API in order to keep the API for both Win and Web ReportViewers consistent. You can find the updated Client API here.

Best wishes,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
John Giblin
Top achievements
Rank 1
answered on 09 Sep 2008, 02:47 PM
thanks.  that worked great.
0
Cairo Algernon Cairo Algernon
Top achievements
Rank 1
answered on 06 Oct 2009, 07:11 AM
Hello eric,

For the print use the following code
Print parameter declarations
DATA: val(1) TYPE c,
pripar TYPE pri_params,
arcpar TYPE arc_params,
lay TYPE pri_params-paart,
lines TYPE pri_params-linct,
rows TYPE pri_params-linsz.


lay = 'X_65_255'.
lines = 255.
rows = 65.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = arcpar
in_parameters = pripar
layout = lay
* line_count = lines
* line_size = rows
* no_dialog = 'X'
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.

check val EQ 'X'.
NEW-PAGE PRINT ON
NEW-SECTION
PARAMETERS pripar
ARCHIVE PARAMETERS arcpar
NO DIALOG.

Toner Cartridge

Tags
General Discussions
Asked by
Eric Chiang
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Chris Castle
Top achievements
Rank 1
Rossen Hristov
Telerik team
MarkInTexas
Top achievements
Rank 1
John Giblin
Top achievements
Rank 1
Steve
Telerik team
Cairo Algernon Cairo Algernon
Top achievements
Rank 1
Share this question
or