This is a migrated thread and some comments may be shown as answers.

problem with sum column in exported report

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kvasov Dmitry
Top achievements
Rank 1
Kvasov Dmitry asked on 14 Jun 2013, 02:18 AM
Hi,
I have problem with sum column in telerik report
In attached my report with sum row and here my code to export this report to pdf:

        protected void Unnamed1_Click(object sender, EventArgs e) {
            // export to pdf
            if (TreeViewFilter.SelectedNodes.Count > 0) {
                int reportId = Convert.ToInt32(TreeViewFilter.SelectedValue);
                string fileName = string.Format("Report{0}.pdf", reportId);
                string fileNameGuid = string.Format("Report{0}{1}.pdf", reportId, Guid.NewGuid());
                string name = string.Format("{0}\\{1}", ConfigurationManager.AppSettings["ExportFolderPath"], fileName);
                if (File.Exists(name)) {
                    //Set the appropriate ContentType.
                    Response.ClearContent();
                    Response.ContentType = "Application/pdf";
                    Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", fileNameGuid));
                    //Write the file directly to the HTTP content output stream.
                    Response.WriteFile(name);
                    Response.End();
                }
            }
        }

The problem is that i can see sum row in report preview but it does not appear in the exported file. Where the problem? Thanks.

2 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 18 Jun 2013, 01:08 PM
Hello Kvasov,

I am not sure whether I understand you correctly. On the report preview I notice that the data in the column is missing but there is aggregate in the footer. Are you trying to export the footer aggregates in the PDF file. I prepared a small sample and attached it to this forum post. Could you please give it a try and let me know where you are trying to achieve the same behavior. If not could you please elaborate a little bit more on your scenario?

Regards,
Kostadin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Kvasov Dmitry
Top achievements
Rank 1
answered on 20 Jun 2013, 02:57 AM
Are you trying to export the footer aggregates in the PDF file - yes

Thanks for sample, i'll look it and try to change my code. 

Tags
Grid
Asked by
Kvasov Dmitry
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Kvasov Dmitry
Top achievements
Rank 1
Share this question
or