Telerik Forums
Reporting Forum
1 answer
163 views

I am using HTML5 Web Form REST Telerik Reporting Q1 2017. When setup the first report which is using the wizard the report and parameter working properly.

However when I tried to pass the parameter from Querystring (from other web form) the report parameter becomes Null.

Please help me, What is the best workaround or solution for this issue?

=======================================================================

On the Page_Load report viewer I get the value from Querystring :

 protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RptQuot1 report = new RptQuot1(Request.QueryString["Parameter1"] as string);
         
            }
        }

On the report constructor I added the parameter "Parameter1"

public RptQuot1(string parameter1)
        {                        
            InitializeComponent();
            this.DataSource = null;
            this.ReportParameters["Parameter1"].Value = parameter1;         
        }

Also on that class I added the NeedDataSource event handler :

public void RptQuot1_NeedDataSource(object sender, System.EventArgs e)
        { 

          Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;

          this.sqlDataSource1.Parameters[0].Value = report.Parameters["Parameter1"].Value;

          report.DataSource = this.sqlDataSource1;

        }

Stef
Telerik team
 answered on 17 Jul 2017
5 answers
349 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
145 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
445 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
231 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
184 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
629 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
271 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
148 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
527 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
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?