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

                                    We have created dynamic web rport from datasource. Attached is the sample code. However, I could not succeed to set the column widths as per the data size in it. ie. If empno is a 10 characters column then size should be small but Name has 100 characters, the column width should be more. How to achieve this ?


                                    Thnaking you in advance.

                                    Best Regards,

                                    Kiran

                                GridToReport.zip
                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hi Kiran,

                                Thank you for your report.

                                Unless I am mistaken, you want to generate report table at the runtime mode. In this case, please use approach described in the How to create a report dynamically Knowladge Base article to accomplish this task. If it does not help you, please post a sample project that illustrates the problem. We will examine it and try to find an appropriate solution for you.

                                • Kiran Kesarkar 07.23.2012

                                  As per your link provided, we have exact code for generating dynamice report table. However, it take same widths for all the columns. My question is how set different widths for different columns. ie. the data columns having less characters in datasource should be assinged less width for cells and for data columns haviing large chars in datasource should be assigned more width cells in dynamic report table.

                                  How to achieve this in dynamically generated datasource to create dyanmic xtrareport.
                                  I hope you understand it now. Please let me know for further information.

                                  Regards,

                                  Kiran

                                • Hi Kiran,

                                  I am afraid there is no built-in method to specify a particular table cell width based on the corresponding data field content. As an immediate solution, create a custom procedure to examine the datasource collection and determine appropriate table cell width values.

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.

                                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.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners