Telerik Forums
Reporting Forum
1 answer
296 views
Hi,
I'm trying to put string 
"     ===CARD PAYMENT===\r\n\r\nMERCHANT               0000001\r\nTERMINAL               0000001\r\nTIME         18 Jul 2017 18:31\r\nAID             A0000000031010\r\nAPP LABEL      CREDITO DE VISA\r\nCARD          ************0119\r\nPAN SEQ Number              01\r\nENTRY                 VISA ICC\r\nAUTHORISATION           025976\r\nREFERENCE               004779\r\nPURCHASE               GBP2.95\r\nTOTAL                  GBP2.95\r\n                              \r\n"
as a Value of TextBox on Telerik Report. Each line has 30 characters.
The value is displayed on report like `Telerik report.png` but I'm expecting the layout should be like in Visual Studio view (`Visual Studio view.png`).
Looks like the space character uses less width.

Is here any workaround to display it like on `Visual Studio view.png`?

Thank you,
Yuriy.
Stef
Telerik team
 answered on 19 Jul 2017
1 answer
632 views

Hi!
I am working on Telerik Reporting and I need to hide panels when the list I use by ObjectDataSource is empty. How can I handle it? Those blue are panels, and just below the lists. But they are not together, do I have to connect them by something like subreport? Do I have to write some code?

Thanks a lot!

Stef
Telerik team
 answered on 19 Jul 2017
3 answers
424 views

Hi,

I'm trying to add reports to a report book and display the report book in a MVC project, but I haven't found a way to do it so far.

Here is the code behind sample

        public ActionResult ReportBook()
        {
            ReportBook reportBook = new ReportBook();
            reportBook.Reports.Add(new TelerikReporting.MissionPlanning());

            Report report = new Report();
            report.DataSource = new UriReportSource() { Uri = "TelerikReporting.AgencyList, TelerikReporting" };
            reportBook.Reports.Add(report);

            InstanceReportSource instanceReportSource = new InstanceReportSource();
            instanceReportSource.ReportDocument = reportBook;

            return View("ReportBook", instanceReportSource);
        }

and the view code

@model Telerik.Reporting.InstanceReportSource

@(Html.TelerikReporting().ReportViewer()

        .Id("reportViewer1")
        .ServiceUrl("/api/reports/")
        .TemplateUrl("/Reports/templates/telerikReportViewerTemplate-9.1.15.624.html")
        .ViewMode(ViewMode.Interactive)
        .ScaleMode(ScaleMode.Specific)
        .Scale(1.0)
        .PersistSession(false)
        .ReportSource(Model)
)

This results in an empty report with a "No Report" message. I don't see what I'm doing wrong, it looks like the few samples I've found.
I've managed to display a single report by using a TypeReportSource instead of an InstanceReportSource, but that's not what I need...

Stef
Telerik team
 answered on 18 Jul 2017
1 answer
146 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
322 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
132 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
420 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
204 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
161 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
596 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
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?