Telerik Forums
Reporting Forum
1 answer
213 views
Hi,

I have Telerik Report Viewer in my page with option Print.

when i click Print Option ,it prints a single report page in 3 pages of paper.

I want to print a report page in a page of paper.

if there is 2 pages in report,print in 2 pages of paper.

Paper im using is A4.

Can anyone please help me in this ??


Thanks in advance.

----
AGMRAJA
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 05 Mar 2013
3 answers
1.1K+ views
Hello,
in an ASP.NET application, I need to use an OCRB font for some reports. Unfotunately, the OCRB font is not installed in the server, but I have it in a TTF file. How can I use it inside the reports?
Patrick
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 05 Mar 2013
2 answers
65 views
Hi,

Im using Telerik Report Viewer in Project with my Master page Merged.

It works fine without the master page.

when im using it with my CSS,the Report Viewer shows two Print button,two Forward Navigation button.. etc.

that is one is with Enabled class (Green Colored Image) and another one is with disabled (Gray Colored Image)
 class.

so anyone please help me in this.

--

AGMRAJA
Agm
Top achievements
Rank 1
 answered on 05 Mar 2013
1 answer
154 views
Hello, I'm trying to print on my report the values a user selects. It's a multivalue paramter.

{Parameters.ParamName.Value} provides System.Object[]

I realize this is an array.

How do I print those values on my report? Furthermore, I'd like the DisplayMember, not the ValueMember.

Thanks,
-Mack
Squall
Top achievements
Rank 1
 answered on 05 Mar 2013
2 answers
330 views
Hi all,

I have a report localized in many languages and it works well when I request the contents from a report viewer and I set the threat to match the report's localized language.

Now, I would like to download the report without having to change the current threat or using the report viewer. The code below generates the PDF file directly and presents the document ready for download to the browser, this is what I would like to have but I cannot get it translated. I was trying to use the report parameters with the report's code behind to set the language in the report but unfortunately the report must be initialized before I can work with the parameters.
Is that possible?

The code looks like this:
Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
instanceReportSource.ReportDocument = New Reporting_Service.doc_PO_ShippingInstructions
instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("Id", 31))
instanceReportSource.Parameters.Add(New Telerik.Reporting.Parameter("LanguageID", 1))
 
Dim reportProcessor As New ReportProcessor()
Dim result As RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, Nothing)
Dim fileName As String = result.DocumentName + ".pdf"
Response.Clear()
Response.ContentType = result.MimeType
Response.Cache.SetCacheability(HttpCacheability.Private)
Response.Expires = -1
Response.Buffer = True
Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName))
Response.BinaryWrite(result.DocumentBytes)
Response.End()
IvanY
Telerik team
 answered on 05 Mar 2013
0 answers
118 views
Hey, I got a problem with the following requirements:
By clicking a button a report has to be generated and immediately downloaded in special format. 
I would also prefer using trdx Files for designing reports. I found out that these files can be used by the report viewer, but using a report viewer doesn't meet the requirement. 

my problem in particular is that the second parameter of the method RenderReport is a ReportSource. But there is no way to use the trdx File. 
Maybe I use a wrong pattern, or do I have to serialize the trdx File and create a Report.cs File ?

Thank you in advance


EDIT:

Sorry, I found out, that it is possible to use the trdx file as ReportSource by using UriReportSource

So, problem solved
BigzampanoXXl
Top achievements
Rank 1
 asked on 05 Mar 2013
6 answers
252 views
Hello,
I've revisited my report upgrading it to last stable build (so I've to use InstanceReport for passing data to the subreports) but I've got a really ugly problem.... I've got data mixed.... for example report for user 1 contins data for user2 and so on...I'm afraid that the static InstanceReport is the problem... that the report on thread x reads data from thread y and so on...

any feedback on this?
Thanks
Svetoslav
Telerik team
 answered on 05 Mar 2013
2 answers
244 views
I want to show the Hashtable data in textbox of Telerik report. My class structure is like:

Public class MyClass
{
public Hashtable ValHash { get; set; }
}

MyClass obj = new MyClass();
obj.ValHash = new Hashtable();
obj.ValHash.Add("Name", "Prasant");

While setting Hahtable value to textbox, as:
this.textBox1.Value = "= Fields.ValHash[\"Name\"]";

I am getting an error as "Missing operator before '["Name"]' operand.

Am i doing anything wrong?
Prasant
Top achievements
Rank 1
 answered on 05 Mar 2013
2 answers
163 views
I get a strange error when i try to output an excel report book to a response stream. This code was working perfectly before cant figure out why telerik is behaving strangely. We are using Telerik reporting 4.0.10.310.  
What is wrong... my intention is the excel file must download to the client on click of a button.
Here when i click on the save and open the file from the local drive the xls is perfect.
but when i click on open .... it downloads a copy of the aspx page where it says the format is different or the file is corrupted.
This is my code
I found if i remove the multiview and the view the same exact code works perfectly. I have another form where this kind of set up works(multiview-view-updatepanel). I dont understand the difference.
What is wrong?


Page has a buttion inside Multiview->view->updatepanel

<asp:MultiView ID="mvwReports" runat="server">

<asp:View ID="vwTotalCostOfOwnership" runat="server">

                                <div id="divExport" runat="server" class="aright">

                                     <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional" RenderMode="Inline">

                                        <ContentTemplate>

                                            <asp:ImageButton ID="imgBtnExcel" runat="server" CausesValidation="false" ToolTip="Excel"

                                                Visible="true" AlternateText="Excel" Enabled="true" ImageUrl="~/App_Themes/WebBlue/images/excel_icon.gif"

                                                OnClick="imgBtnExcel_OnClick" />

                                        </ContentTemplate>

                                        <Triggers>

                                            <asp:PostBackTrigger ControlID="imgBtnExcel" />

                                        </Triggers>

                                    </asp:UpdatePanel></div>

                                    </asp:View>

                                    </asp:MultiView>

Code behind

protected void Page_Load(object sender, EventArgs e)

        {

            mvwReports.ActiveViewIndex = 0;

            

        }

        protected void imgBtnExcel_OnClick(object sender, EventArgs e)

        {

            Response.Clear();

            Response.ContentType = "application/vnd.ms-excel";

            Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);//(HttpCacheability.Private);

            Response.Expires = -1;

            Response.Buffer = true;

            Response.AddHeader("Content-Disposition", string.Format("{0};FileName=\"{1}\"",

                                "attachment","test" + ".xls"));

            Response.TransmitFile("e:\\temp\\excel\\test.xls");

            HttpContext.Current.ApplicationInstance.CompleteRequest();

        }

David
Top achievements
Rank 1
 answered on 04 Mar 2013
12 answers
924 views
This is an ASP.Net app with a page with a report viewer control on it.  The very first time in a session that you export any report to PDF, it is very sloooow.  It can take a minute, and this is on a very good production server.  Then, the next report you export is virtually instant.  Or go to another report, the export is still instant.

Anyone else notice this? 

Seems like this would be an issue of loading an assembly or something, then once it's there, things are fast.  This problem also exists in SSRS.  It is not a good user experience though and I don't think it should be like this. 

Is there anything to be done about this?  I was thinking a poor man's solution would be to script something that does an export periodically behind the scenes, just to keep the code loaded up in memory or something.

Thanks.
Stef
Telerik team
 answered on 04 Mar 2013
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?