Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi,

                                    I am using XtraReport control. I am exporting it to .pdf and .xlsx file. I have attached both pdf and xlsx file.
                                    As you can see there is a group header. I format the group header lable using follwing code.

                                                XRLabel l = new XRLabel();
                                                l.DataBindings.Add("Text", this.DataSource, gridColumn).FormatString = "TEST : {0}";
                                                

                                    My issue is in pdf the formatting label works fine but when i export it to xlsx it show the formatted label for second group header only. Am i missing any thing or doing any thing wrong.

                                    The same issue occur for formatting summary using summary.FormatString. It works fine for pdf but not for xlsx.

                                    Thanks,
                                    Badal

                                XtraReport.7z
                                0

                                Hi Badal,

                                I am afraid I have no idea why this issue occurs. Would you please post here a small sample project, where the problematic behavior can be reproduced? Also, please provide us with a detailed step-by-step guide as to how to reproduce this issue. This will allow us to localize the cause of the problem. Thank you for your feedback in advance.

                                Thanks,
                                Sergi

                                0

                                Hi,

                                Thanks for your reply. Here I have attached a sample project which may help you to short out my issue. Here I am displaying Group summary at the right side in group header. When I am exporting the report to pdf file formattind summary worked as expected but when i am exporting it to xlsx file formatting summary does not work. The same issue occur for the report footer "Row Count".

                                Thanks,
                                Badal

                                dxsample.7z
                                0

                                Hi Badal,

                                Thank you for sending the sample project to us. It seems that you forgot to specify the XlsxFormatString property for your summary label. Please add the following code:

                                	
                                [C#]
                                label.XlsxFormatString = "\"Sum of " + GroupSummary[j].ToString() + " is \"" + "0.00";

                                We look forward to your feedback once you have had the opportunity to try this approach.

                                Thanks,
                                Sergi

                                0

                                Hi,

                                I had tried out label.XlsxFormatString as below. But that didnt work for me.

                                label.XlsxFormatString = "Sum of " + GroupSummary[j].ToString() + " is " + "{0:n2}";

                                But now i tried out your code. Which works as i expected. Thank you so much for your such a nice responce

                                Thanks,
                                Badal

                                0

                                Hi Badal,

                                I am glad to hear that the problem has been resolved. Thank you for letting us know of your progress.
                                Please feel free to contact us if you have any difficulties. We will be happy to assist you.

                                Thanks,
                                Sergi

                                0

                                Hi,

                                I found one issue regarding the label.XlsxFormatString = "\"Sum of " + GroupSummary[j].ToString() + " is \"" + "0.00".

                                I have attached two screen shot to explain my issue so you may get better idea. Here the when we apply abel.XlsxFormatString to negative value it display text as "-Sum of Total is 40491.12" instead of displaying "Sum of Total is -40491.12". Means it display the negative sign at the starting of my string instead of my value. Hope you understand my issue

                                Thanks,
                                Badal

                                XtraReport.7z
                                0

                                Hi Badal,

                                Thank you for contacting us. Please note that the XlsxFormatString uses native Excel format string. So, I suggest that you review the Excel Custom Number Formats that should help you produce the FormatString according to your requirements.

                                I have reviewed this document and suggest that you change the XlsxFormatString as follows to fix this problem: [<0]"Total order cost: "-$0.00; [>0]"Total order cost: "$0.00
                                In your case, it should looks as follows: "[<0]\"Sum of " + GroupSummary[j].ToString() + " is \"" + "0.00; [>0]\"Sum of " + GroupSummary[j].ToString() + " is \"" + "0.00"

                                Thanks,
                                Sergi

                                0

                                Hi,

                                Thank you so much for your support. And now it also works for negative values. And my problem has been resolved using your code.

                                Thanks,
                                Badal

                                0

                                Hi Badal,

                                Please feel free to contact us in the future. We will be glad to help you.

                                Thanks,
                                Sergi

                                0

                                Hi,

                                I have an issue related to XRSummary. Can i display two different kind of summary in single label.

                                For example i have two summary as bellow. One is summary type sum and another is average.

                                1). label.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "Sum of " + "xyz" + " is " + "{0}");

                                2). label.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Avg, "Avg of " + "xyz" + " is " + "{0:n2}");

                                But I want to display both sum and average summary in single lable. I am using same dxSample. So what i need to modify if i want to display group sumarry as "Sum of xyz is sumvalue, Avg of xyz is avgvalue"

                                Thanks,
                                Badal

                                0

                                Hi Badal,

                                This question does not directly relate to the initial one. So, I have created a separate report for it: How to show a different summaries within a single label
                                P.S. In the future, please do not post new questions within existing issues. Please open a new thread for each new question.

                                Thanks,
                                Sergi

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners