Telerik Forums
Reporting Forum
2 answers
225 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
1.0K+ 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
2 answers
73 views
Hi team,
i couldn't find the video for the below demo.
http://demos.telerik.com/reporting/report-book/video.aspx
Regards,
Mohammed
Mohammed
Top achievements
Rank 2
 answered on 04 Mar 2013
3 answers
181 views
Dear team,
I'm afraid to say I got crazy with the chart styles or its configuration in general.
I try to study the documentation and make implementation to a sample static chart I created.
I assigned a skin to the chart at the beginning and after that i tried to customize the styles according to what i read in the documentation but almost every time i don't see the updated styles.
now I see in the design mode some of my styles but when I run it in the preview mode I can't see it "check the attached photo"
is chart styles override each other ? and if yes how can i know what override what ?
we are attending to buy the reporting tool but as you see I have troubles to understand the chart.
Regards,
Mohammed
Mohammed
Top achievements
Rank 2
 answered on 04 Mar 2013
2 answers
584 views
Hi team,
in my application I use a library project to present my business logic layer.
normally when I create a report in visual studio i can see my layer while creating the object data source.
how can I do the same in the stand alone designer.
I want to use the object data source while creating a report in the stand alone designer.
and what if the business logic project updated, what should i do to make the designer feel the updates.
Regards,
Mohammed
Mohammed
Top achievements
Rank 2
 answered on 04 Mar 2013
3 answers
204 views
Hi,

I put static content in htmlTextBox of one page. It is showing in normal preview and html view. But If export that report in rtf format and open in word, it is showing only 1/4 content. Page breaks also not showing as showin in preiview. I have set CanGrow=true and CanSink=true, PageBreak=Before for all the sections, but the problem still there.

Please help me regarding this.


Regards,

B.Sridhar
Chavdar
Telerik team
 answered on 04 Mar 2013
1 answer
178 views
Hello
Do you have a feature to automatically generate a table of content, in the first page of a report book ?
thanks.
Stef
Telerik team
 answered on 02 Mar 2013
5 answers
184 views
(I posted this as a support ticket, but other users need to be aware, until this is fixed, that the upgrade process to Q1 2013 currently has major flaws so also posting it here).

Since I upgraded to Q1 2013 of Telerik Reporting, not only has my toolbox been messed up in Visual Studio 2012 (I can't see any Reporting controls, and Resetting the toolbox hasn't helped), but I can't add any data sources, and my previous projects (which used 2012 Q3 Telerik reporting) don't work any more: I just get a Loading ... title page when trying to view a report in a previous project.


Please help urgently, as this the installation documentation (and upgrade process) is clearly faulty/inadequate and I can't do any work on reporting aspects of our projects until this is fixed!

Thanks
Stef
Telerik team
 answered on 02 Mar 2013
3 answers
103 views
Dear team,
can you help me to find some resources to study the chart and the graph controls while creating my reports ?
Documentation and videos would be great.
Regards,
Mohammed
Mohammed
Top achievements
Rank 2
 answered on 01 Mar 2013
3 answers
61 views
Hi,
            I'm using telerik reporting in my page. The alignment of the record gets shrinked in ie8. Please find my attachment.
Petio Petkov
Telerik team
 answered on 01 Mar 2013
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?