Current filter:
                                You should refresh the page.
                                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

                                Q145226.zip
                                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.