Telerik Forums
Reporting Forum
2 answers
203 views

Hello All,

I am new to Telerik, please excuse me if I'm asking anything obvious.

I am trying to test if localization is working for PDF exported programatically from Telerik Report template created through Visual Studio Report Designer. I set browser's language to Marathi (culture code - mr). Below is my code through which PDF is exported.

public ActionResult DownloadSamplePDFReport ()
{
    Telerik.Reporting.Processing.ReportProcessor reportProcessor =
                    new Telerik.Reporting.Processing.ReportProcessor();
    System.Collections.Hashtable deviceInfo =
        new System.Collections.Hashtable();
    Telerik.Reporting.TypeReportSource typeReportSource =
                 new Telerik.Reporting.TypeReportSource();
    typeReportSource.TypeName = typeof(SampleReport).AssemblyQualifiedName;
    Telerik.Reporting.Processing.RenderingResult result =
        reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);

    byte[] fileBytes = result.DocumentBytes;
    string fileName = "Output.pdf";

    return File(fileBytes, MediaTypeNames.Application.Octet, fileName);
}

I have created resource file named SampleReport.mr.resx which contains localized strings for Marathi language. Still output PDF contains default strings instead of localized one. Please help me resolved this issue.

Thanks,

Tejas Sutar

Tejas
Top achievements
Rank 1
 answered on 20 Apr 2017
4 answers
419 views

Hi,

We have a web application stateless, to pass the lang, all of the url of application are in the format (/xx/api/controller (xx = fr | nl | ...) (and we have a "filter" to change the CurrentUICulture based on this).

We try to use the Html.TelerikReporting().ReportViewer() (Asp.net Mvc ReportViewer) but we can not pass the lang from the client to the server side, the url of your service is like /api/reports/** and we can not change this or alter this to add parameter), thus how to pass the language ?

<globalization culture="auto" uiCulture=auto” /> is not viable because the client can change at any time the language.

-----

I have even a badder case, for one report, the language is a report parameter for a pratical reason  ! But you can not change the language in NeedDataSource, because it is too late, but before  InitializeComponent, it is too early because no parameters ? How do to that ?

I googled, i searched on the forum, but nothing ?!. I was so easy with web form because we can intercept the creation of the report but here i do not find the way to intercept the creation and alter the culture ?

 

Thanks for any help.

Stef
Telerik team
 answered on 20 Apr 2017
16 answers
1.1K+ views
I create a web report using win2003 using locale OS date format yyyy/mm/dd HH:mm:ss and the display format on the filter parameters section is yyyy/mm/dd with debug locally on the development machine as shown 1.jpg. However, I publish the web to Win2008R2 SP2 using the same locale OS date format yyyy/mm/dd HH:mm:ss and the display format on the filter parameters section is mm/dd/yyyy as shown on the attached 2.jpg. Please advise what I should do on the win2008R2 SP2 machine to display the same as 1.jpg. What is affecting the date time display format. The development and production machines are having the same date time format setting.

Thanks in advance.

Stef
Telerik team
 answered on 20 Apr 2017
2 answers
201 views

 

 I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

            var typeReportSource = new Telerik.Reporting.TypeReportSource();

            // reportToExport is the Assembly Qualified Name of the report
            typeReportSource.TypeName = typeof(Reports.Report1).AssemblyQualifiedName;
            var deviceInfo = new System.Collections.Hashtable();
            deviceInfo["JavaScript"] = "this.print({bUI: true, bSilent: false, bShrinkToFit: true});";
            var result = reportProcessor.RenderReport("PDF", typeReportSource, deviceInfo);

            HttpContext.Response.AddHeader("content-disposition", "inline; filename=Ciudadano.pdf");
            return File(result.DocumentBytes, "application/pdf");

 

 


I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

I am working with telerik reporting in pdf there is something I do not want to use is the page to print the pdf .. I just want the page where the pdf is displayed there is the image

Daniel
Top achievements
Rank 1
 answered on 19 Apr 2017
1 answer
150 views

Hi Guys,

I have a report with two Lists. One for text fields, other for images. These lists are displayed side by side. The problem ocurrs with the Text List. It create spaces between texts to make the size equals to Image List. Then, if the image list, have only 2 images, the text list not have space. If I have more than 3 images, the texts will increase spaces between text fields.

Atacched files can explain more.

How can I keep the text List with the same height,regardless of how many images have in Images List ?

Katia
Telerik team
 answered on 19 Apr 2017
1 answer
311 views

Hello,

I'm completely new in Telerik reporting, I'm trying it now :)

I'd like do something basic (I think). I have an ASP.NET MVC 5 application. A button on a page, I'd like with a complex object created in an action use it as report data source. I read the documentation, around the web and the sample in the demo folder but it's still not clear to me.

How link report designer to the complex object at design time and at runtime ? Do you have a real example ?  A clear doc ? or a good explanation ? ;-)

Thanks,

 

 

Stef
Telerik team
 answered on 18 Apr 2017
1 answer
124 views

Hi guys,

 

There is a way to display these warning messages when creating a report in runtime?

I´m building a report layout 100% at runtime. Some times, some elements are not displayed and I´m not sure if the problem is related to layout or other things.

Stef
Telerik team
 answered on 18 Apr 2017
1 answer
309 views

Hi Guys,

 

It´s possible to make the height property of PageHeaderSection to adjust to the height of your content panels?

And, I can´t adjust the height manual, because when I create a panel, I don´t know the height of this panel.

 

Regards,

Stef
Telerik team
 answered on 18 Apr 2017
3 answers
807 views

I have a ASP.NET application that uses a report viewer to generate a multi page page single report. The client wants each page to show in a separate tab when they select export to Excel. I have been doing some research and it seems like the Report Book is the way to go but I am finding the examples and documentation very lacking. I am looking to see if this is even possible with the current configuration.

My Setup:
I have a page with a grid control and allow multi select.
The user can select multiple rows and then click a "print" button
I open a RadWindow with a ReportViewer passing the string of ID's selected from the grid via querystring
On the Page_Load event of the RadWindow I pass the string of ID's to the report parameter
This pulls the selected records from the database and the ReportViewer shows one or more pages depending on the row selection.

This all works perfectly when printing the report. However, exporting to excel from the ReportViewer control results in a single sheet. 

Can I move this to a ReportBook? I only have one report (as a class) and it seems like the ReportBook is designed to combine different reports together. 

If the ReportBook is not possible is there another solution?

Thanks,
Craig

Stef
Telerik team
 answered on 18 Apr 2017
3 answers
191 views
I'm trying to add margins to reports in our WPF report viewer when viewing them in print preview and also printing the report itself. We build our reports programmatically. I've set the PageSettings.Margins on the report to what I'd like them to be and I've set the report.Width to what I believe it should be but these fields have no effect on what is displayed in the report viewer itself or what happens when it is printed. Everything is shifted to the top left of the page. Is there a setting that I am missing?
Stef
Telerik team
 answered on 18 Apr 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?