Telerik Forums
Reporting Forum
5 answers
314 views
I have some code in a class that I use to export a report to pdf without having to use a report viewer and it works great except that the user is always prompted to Open or Save the report. I want the report to open directly in a new page without the prompt. I also would like to make the cursor change while the report is rendering so the user knows the print button was actually clicked. Thanks for any help.


He is my class code :
Imports Microsoft.VisualBasic  
Imports Telerik.Reporting.Processing  
Imports MyTelerikLibrary  
Public Class TelerikFunctions  
    Inherits System.Web.UI.Page  
    Public Function ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report) As Telerik.Reporting.Report  
 
        Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor()  
        Dim result As RenderingResult = reportProcessor.RenderReport("PDF", reportToExport, Nothing)  
 
        Dim fileName As String = result.DocumentName + ".pdf" 
        HttpContext.Current.Response.Clear()  
        HttpContext.Current.Response.ContentType = result.MimeType  
        HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.Private)  
        HttpContext.Current.Response.Expires = -1  
        HttpContext.Current.Response.Buffer = True 
 
        HttpContext.Current.Response.AddHeader("Content-Disposition"String.Format("{0};FileName=""{1}""""attachment", fileName))  
        HttpContext.Current.Response.BinaryWrite(result.DocumentBytes)  
        HttpContext.Current.Response.End()  
    End Function 
End Class 
Here is the Buttons click event (along with page declarations)
 Imports Telerik.Reporting.Processing

 

Imports MyTelerikLibrary  

 

Dim tF As New TelerikFunctions  
Dim rv = New RwpListingD007()  
tF.ExportToPDF(rv)  
 

prateek
Top achievements
Rank 1
 answered on 17 Jul 2017
1 answer
127 views
In Telerik 2012 Q1 i have created a reportbook. This reportbook needs to be opened in a new window. I cannot create this option. I'm using the following code:

void ExportToPDF(Telerik.Reporting.ReportBook reportToExport)
       {
           var deviceInfo = new Hashtable();
            
           ReportProcessor reportProcessor = new ReportProcessor();
           RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, deviceInfo);
         
           ////Create filename for PDF if saved
           //string fileName = result.DocumentName + ".pdf";
 
           Response.Clear();
           Response.ContentType = result.MimeType;
           Response.Cache.SetCacheability(HttpCacheability.Private);
           Response.Expires = -1;
           Response.Buffer = true;
 
           ////Code for automatically save PDF report
           //Response.AddHeader("Content-Disposition",
           //                   string.Format("{0};FileName=\"{1}\"",
           //                                 "attachment",
           //                                 fileName));
 
           
           Response.BinaryWrite(result.DocumentBytes);
           Response.End();
       }

This code is generated from several threads but I can't get it worked! It opens a PDF but in the same window!

Thanks in advance!


prateek
Top achievements
Rank 1
 answered on 17 Jul 2017
2 answers
410 views
I generate report (PDF) programmatically,

is it possible to open report in new browser window ?

prateek
Top achievements
Rank 1
 answered on 17 Jul 2017
1 answer
188 views

Hi all,

I am a new user.

I want to know: How many  the number of records maximun to telerik reporting can load or view?(Exam: 1 Million records)

Yana
Telerik team
 answered on 17 Jul 2017
1 answer
145 views

Have a Telerik report that is generated in legal, landscape mode.  Margins are set as well as the page properties however when running the report and attempt to print, the page is listed as Portrait and letter.  How do I set the print properties of the report?

Also with this report all the data is in a table and when viewing the PDF, there are the table lines that continue on the bottom of the page (see image for illustration).  How do I remove them?  I understand they are problem from the table and due to the table continuing onto the next page, it displays the lines.  I would like for the last record on the page to be just a straight line across.

Stef
Telerik team
 answered on 14 Jul 2017
3 answers
570 views

Hi all,

I am a new user.

I want to know:

In table,  limit the number of records in a report can load or view?

limit the number of columns in a table can view?

Stef
Telerik team
 answered on 14 Jul 2017
3 answers
235 views

Hello,

I have a report with two report parameters (Cities and Streets).

My SQL query looks like:

City ID   |   City Name   |   Street ID   |   Street Name
    1        |     Paris         |         1         |     Street P1
    1        |     Paris         |         2         |     Street P2
    2        |     London     |         3         |     Street L1
    2        |     London     |         4         |     Street L2
    3        |     Rome       |         5         |     Street R1

Now I want to have a two-way dependency between these two dropdowns.

That means:
1. If I choose a city from the cities dropdown, I want to see only the streets of the choosen city in my streets dropdown.
2. If I choose a street from the streets dropdown, I want that the city dropdown is automatically filled with the city of the choosen street.

How can I do this?

It was easy to create a filter for an one-way dependency (if I choose a city, I only see the streets of the city) but I do not get it out that both work.

Thank you for any help
Diego

Stef
Telerik team
 answered on 14 Jul 2017
1 answer
121 views

Hello There,

 

I have an Issue while generating a report from Report Viewer, this report is generated properly through Telerik Report Designer I attach screenshot.  However , when I attempt to execute the report from Report viewer the report shows an empty page after "Generating Report" message.

 

Thanks in advance.

 

 

Stef
Telerik team
 answered on 14 Jul 2017
1 answer
472 views

Hi all,

I have a table with 200 records.

When I scroll down, header is hide. 

I want to Freeze(locked) header when I scroll like in excel.

I Freeze(locked) dimension column, too

Can anyone help me?

I am using Telerik Reporting R2 2017 SP1 (version 11.1.17.614)

Stef
Telerik team
 answered on 14 Jul 2017
3 answers
612 views

The way Telerik is dealing with checkboxes in ReportViewer/ReportDesigner appears not to be up to the standard elsewhere in this excellent product. The only checkboxes available seem to be bluish bitmaps (or alternately our own graphics).  Are there plans to make available the option to use a font-based checkmark (e.g. Wingdings)?  I am working on a project that creates a printout that contains many, many checkboxes and the graphic checkboxes make for an ugly page. Alternate suggestions welcome, thanks.

Doug
Top achievements
Rank 1
 answered on 14 Jul 2017
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?