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

                                    I'm trying to build a report using information generated from inside a C# service application and can not get the data into the report. So far I've rebuilt my function call to build a DataTable from several Lists and a few calculations but I can't seem to get the report to allow me to select it as a data source. This data is not pulled from a database and all of the tutorials seem to focus on that. How can I get it to accept our data to use it to build a table in the program?

                                    Thanks.

                                0

                                Hi Michael,

                                Yes, you can use the DataTable as DataSource.
                                Please review the How to create a report dynamically KB article, to learn how to accomplish this task at runtime.

                                Thanks,
                                Andrew

                                0

                                Hi,

                                Thanks for the quick response last time. However the article you linked to does not address my exact question. I definitely do not want to build the report all in code like the example states. I want to use the report editor to make our report. I had already manually set the table I was working with as a source I just can't get it to show up in the Designer. Neither setting it manually or using the "Add a Dataset..." option allows me to select my DataSet in the field list menu. I'm sure I am just missing something here but it seems like there's no way to get it to show up.

                                0

                                Hi Michael,

                                You need to assign the DataSet as the Report DataSource, then select (or type) DataTable.Name as the XtraReport.DataMember. The field list should be properly filled afterwards.
                                Please try this solution, and let us know the results.

                                Thanks,
                                Andrew

                                0

                                Hi,

                                My major problem lies in actually assigning the dataTable as a datasource for the report. For instance if i were to create a datatable using the following code (which I took from your example):

                                public DataSet FillDataset() {
                                            DataSet dataSet1 = new DataSet();
                                            dataSet1.DataSetName = "nwindDataSet1";
                                            DataTable dataTable1 = new DataTable();

                                            dataSet1.Tables.Add(dataTable1);

                                            dataTable1.TableName = "Category";
                                            dataTable1.Columns.Add("CategoryName", typeof(string));
                                            dataTable1.Columns.Add("count1", typeof(int));
                                            dataTable1.Columns.Add("count2", typeof(int));
                                            dataTable1.Columns.Add("count3", typeof(int));

                                            dataSet1.Tables["Category"].Rows.Add(new Object[] {"Beverage",10, 30,2});
                                            dataSet1.Tables["Category"].Rows.Add(new Object[] {"Grocerie",20, 40,4});
                                            dataSet1.Tables["Category"].Rows.Add(new Object[] { "Meat", 30, 50 ,1});
                                            dataSet1.Tables["Category"].Rows.Add(new Object[] { "Vegetable", 5, 5,8 });
                                            dataSet1.Tables["Category"].Rows.Add(new Object[] { "Fish", 5, 5 ,10});
                                            return dataSet1;

                                        }

                                How would I use this created dataset to fill a report built using the design view for the xtraReport object? I'd hate to have to hand code a report when you guys have built all thos nice tools to generate them.

                                Mike

                                0

                                Hi Mike,

                                I've attached a sample, illustrating how to accomplish this task by using the Mail Merge feature of XtraReport Suite.
                                Please review it and let us know the results.

                                Thanks,
                                Andrew

                                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