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

Generate a report without opening it

5 Answers 582 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
carl
Top achievements
Rank 1
carl asked on 06 Aug 2010, 09:19 PM
I am currently evaluating Telerik reporting.  One of the projects that I work on requires that a report be generated so it will be formated as we have designed it to look, however we do not want it previewed by the user.  There are two seperate functionalities that we require.  One is the report would be sent directly to a printer.  The other function requires the report to be formated, converted to .pdf and saved directly into our SQL Database by means of a file stream into a binary max field.  We currently have this functionality in a VS2008 project using Crystal Reports.  My desire is to get away from Crystal as quickly as possible, I hope you tell me this can be done.   

5 Answers, 1 is accepted

Sort by
0
Accepted
Chavdar
Telerik team
answered on 12 Aug 2010, 09:58 AM
Hi carl,

You can print and export reports, without previewing them initally in a report viewer, by using the ReportProcessor class and its Print and Render methods. Please, review the Reporting API and let us know if you have any other questions.

Greetings,
Chavdar
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
CHRISTIAN
Top achievements
Rank 1
answered on 22 Feb 2012, 10:17 AM
I also need to create a pdf and save it directly to our database in a varbinary(max) field.
Can you provide a small example how to do this? Reading the Reporting API Reference isn´t that helpfull at all...
0
Steve
Telerik team
answered on 27 Feb 2012, 04:33 PM
Hello CHRISTIAN,

The RenderReport method of the ReportProcessor class converts the contents of a report to a byte array in the specified format, which you can then use with other classes such as MemoryStream or FileStream to handle it and save it as needed. For more information refer to:

Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Sirisha
Top achievements
Rank 1
answered on 10 Aug 2016, 07:29 PM

Hi , 

how to render byte array in a report viewer that is stored in database.Please suggest me .

 

0
Katia
Telerik team
answered on 12 Aug 2016, 11:02 AM
Hi Sirisha,

In case, you want to export a report programmatically, you can use the ReportProcessor and render a report in any of the supported formats.
The resulted document will be provided as a byte array - check 
Exporting Report Programmatically for more detailed information.

Note, that to display a report in HTML5 Report Viewer you need to provide a supported ReportSource object - please check How to: Set ReportSource for Report Viewers help article.


Regards,
Katia
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
carl
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
CHRISTIAN
Top achievements
Rank 1
Steve
Telerik team
Sirisha
Top achievements
Rank 1
Katia
Telerik team
Share this question
or