Telerik Forums
Reporting Forum
1 answer
87 views

I'm currently doing a little proof of concept, but I'm either failing to understand something or I did something wrong.

Here's the code snippet:

class Program
    {
        static void Main(string[] args)
        {
            Telerik.Reporting.Report report = new Telerik.Reporting.Report();
            string selectCommand = @"SELECT * FROM Test.dbo.TestTable"; //Assume that the query works in SQL
            string connectionString = @"Data Source=.\DEVSQL;Initial Catalog=Test;Integrated Security=True;Persist Security Info=True;";
            Telerik.Reporting.SqlDataSource sqlDataSource = new Telerik.Reporting.SqlDataSource(connectionString, selectCommand);
            report.DataSource = sqlDataSource;
            ExportToPDF(report);
        }


        public static void ExportToPDF(Telerik.Reporting.Report reportToExport)
        {
            ReportProcessor reportProcessor = new ReportProcessor();
            Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
            instanceReportSource.ReportDocument = reportToExport;
            RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);

            string fileName = result.DocumentName + "." + result.Extension;
            string path = System.IO.Path.GetTempPath();
            string filePath = System.IO.Path.Combine(path, fileName);

            using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
            {
                fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            }
        }

    }

After executing this I get an empty PDF, even though the table has several rows.

Katia
Telerik team
 answered on 08 May 2018
3 answers
214 views

I have two project 

- Project Angular

- Project existing used Dot net core 2.0 (.NET Core and ASP.NET Core 2.0).

Now, I want to use Telerik Report Rest Service. Help me.

Silviya
Telerik team
 answered on 07 May 2018
1 answer
151 views

I have 2 project:

1. Angular (pictrure: 1.JPG)

2. Rest Service

- I used class MyResolver() (pictrure: 2.jpg)

Error function DeserializeReport

Katia
Telerik team
 answered on 07 May 2018
8 answers
847 views
Hello,

I have created a Master report and a sub report. The Master report has a few columns to be displayed. The sub report is displayed adjacent to the last column of the Master report which has another 2 columns such that when previewed it all appears together as if it is a single report. 

The Sub report has a report parameter whose values are displayed based on one of the columns in the Master report called Column A. The report is absolutely working fine!! But, only some of the values of Column A has corresponding values in the Sub report columns. Most of the values in Column A haven't got any corresponding values in the sub report.Even null values doesn't exist in these sub report columns. So, when I try to preview the report, obviously, only the values that exist appear on the Sub report. And the rest of the columns in the Sub report appears blank which doesn't look great.

So,  I would like to have a text displayed in those blank columns of the sub report like " Data not found". Please help me how to proceed further.


Many Thanks,

Haree
Andy
Top achievements
Rank 1
 answered on 04 May 2018
4 answers
1.1K+ views
I would like to display "No data available message" for my empty datasource   for a cross tab report and I found this link helpful

http://www.telerik.com/community/forums/reporting/telerik-reporting/conditionally-display-message-if-no-results-found.aspx

But i am not able find where i can do the bindings for the textbox item....has this changed in the new version of telerik reporting..Please guide me... i.e in the  textbox properties->bindings->property path i am not able to find parent.visible....

thank you
Andy
Top achievements
Rank 1
 answered on 04 May 2018
1 answer
8.1K+ views
Hello,

I have Telerik Reporting v2.5.8.519 and have a ReportViewer on a SharePoint page.  I put this on using SharePoint Designer and it is working as it should.

The only problem I have is that I want to resize the ReportViewer to 100% of available space on the screen.  I can set the report height in pixels (i.e., Height="500px") which makes the ReportViewer 500 pixels high.  However, if I put in Height="100%" then the ReportViewer does NOT fill up the screen height.  It only fills up the <div> the ReportView control lives in.

How do I do this?

Thanks,

Randall Price
jguti
Top achievements
Rank 1
 answered on 03 May 2018
0 answers
187 views

HI team

I wanted to know if its possible to change the culture of a report during the rendering process.

 

Say for example you are grouping by Country. When printing a given country the Currency symbol should reflect that of the country.

 

Do you set the culture of all the report items in the lower detail sections (and possibly any child  groups) in the item databinding event. Thats what first came to mind.

 

Some code would be appreciated..

 

Kind Regards

 

Michael

Mike
Top achievements
Rank 1
 asked on 03 May 2018
22 answers
1.9K+ views

Hello,
it has been a long time since I got this error happening randomly on my production enviorment and not been able to solve it.... I got this error message when opening a report with 2 parameters (int, datetime) :

Value cannot be null.
Parameter name : Instance.......

Consider that there' approximatelly 400 ppl using this application, I don't know it if it's something related to concurrency or what... I can just say that one time it happens it continue till I do an iisreset

I got this problem with Q2, can't move immediatly to Q3 since we got scheduled deploys..... any suggestion?
Thanks
Paolo

 

Edward
Top achievements
Rank 1
Veteran
Iron
Iron
 answered on 03 May 2018
6 answers
970 views
Hi all,

My application includes a Telerik report for a client that has a printer with A3 printing capability. I have defined the PaperKind to A3, Landscape to False, and the Width to 42cm. The PaperSize (disabled in the Properties list) shows a correct 297mm x 420mm. In design mode everthing looks fine and I can add controls over the required width of the report.

However, when running the report in the WinForms ReportViewer the report splits my pages, spreading the columns over 2 pages. I suspect this is due to the fact that my default printer (attached to my development machine) does not support A3 printing.

Is this a correct assumption?
Can I change this setting so I can see the report on screen in A3 width?

Lucien Dol
QicSoluciens
Wellington, New Zealand

(Telerik Reporting Q1 2011 v5.0.11.316)
Silviya
Telerik team
 answered on 03 May 2018
1 answer
165 views

  Hi, I have some reports implemented in WPF, with the Telerik ReportViewer, in there the user can export the report result to CSV, PDF, Excel, etc. but I want what he will can export it only to PDF, how I can configure?

Thanks

JOSE
Top achievements
Rank 1
 answered on 02 May 2018
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?