Generate a report without opening it

6 posts, 1 answers
  1. carl
    carl avatar
    2 posts
    Member since:
    Jul 2010

    Posted 06 Aug 2010 Link to this post

    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.   
  2. Answer
    Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 12 Aug 2010 Link to this post

    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
  3. DevCraft banner
  4. CHRISTIAN
    CHRISTIAN avatar
    39 posts
    Member since:
    Nov 2010

    Posted 22 Feb 2012 Link to this post

    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...
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 27 Feb 2012 Link to this post

    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.
  6. Sirisha
    Sirisha avatar
    1 posts
    Member since:
    Nov 2015

    Posted 10 Aug in reply to Steve Link to this post

    Hi , 

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

     

  7. Katia
    Admin
    Katia avatar
    301 posts

    Posted 12 Aug Link to this post

    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
Back to Top
DevCraft banner