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

                                    I am new in Dev Express and I have no idea how to create this report.
                                    Please do not refer me any links from previous issues because I am pretty sure I have looked through all of them and I didn't find the solution.

                                    I need to make a report using the printing control from dev express.
                                    This report need to take dataset from a stored procedure and need to be filtered by 5 parameters which are not mandatory ( i should only use 2 of them if I want to ).

                                    Here is how I get the dataset and set to the xtrareport data source:

                                    object[] prmt = new object[5];

                                                prmt[0] = dtPickPaymentDate.EditValue;
                                                prmt[1] = txtCustomerNumber.EditValue;
                                                if (cbo_User.EditValue != null)
                                                    prmt[2] = int.Parse(cbo_User.EditValue.ToString());
                                                if (cbo_Branch.EditValue != null)
                                                    prmt[3] = int.Parse(cbo_Branch.EditValue.ToString());
                                                prmt[4] = dtPickPaymentDateTo.EditValue;

                                                if (chkIndividual.Checked)
                                                    DataSet ds = clsGeneralUtilities.GetDataSet("spc_CustomerIndividualIncorrectParametarization", prmt);

                                                    if (ds != null)
                                                        Reports.xtraRptreport xtra = new CustomerAccounts.UI.Reports.xtraRptreport();
                                                        xtra.DataSource = ds.Tables[0];
                                                        xtra.DataMember = ds.Tables[0].TableName;

                                                        printControl1.PrintingSystem = xtra.PrintingSystem;


                                    This is not working, in debugger I have noticed that the datasource is filled with the dataset correctly but i don't see any result on the report.

                                    In the xtraReport I don't have any code, and the design is empty with header, details and footer.
                                    Should I make some change here or where? I don't get what is the problem.

                                    Thank you.


                                Hi Picot,

                                Thanks for posting the sample code. It looks like you should adjust your data source initialization procedure a bit. Please use the 'ds' DataSet instance when updating the report's DataSource property, e.g.:

                                if (ds != null) { Reports.xtraRptreport xtra = new CustomerAccounts.UI.Reports.xtraRptreport(); xtra.DataSource = ds; // UPDATE THIS LINE xtra.DataMember = ds.Tables[0].TableName;

                                Please update your source code, and let me know whether this helps.



                                Hi Alex,

                                I have tried the way you told me but it doesn't make any change. I don't see the data again.

                                I think the problem isn't there because I can clearly see that the report's datasource is filled with the dataset correctly... it just miss something that will help in representing the data on the report.

                                Maybe the problem is in the xtraReport design because it is empty, I don't have any fields there and I don't know if I should put any and how to do that. Also there isn't any code there except the InitializeComponent() method.

                                What do you think?
                                In addition I am sending you printScreen from the xtraReport.

                                Thank You.



                                Thanks for the information. Actually, a report without controls won't display any data. You should open the report in the Report Designer (Visual Studio), and then place some XRLabel controls into its Detail band. It's possible to skip setting the DataSource in design mode. Simply update the XRLabel.Text property of every label using the corresponding data filed name enclosed in square brackets, e.g. [FirstName] or [LastName]. Please check the Embedded Fields (Mail Merge) documentation article to learn how it works.
                                See also: Lesson 2 - Creating a Data-Aware Report.



                                Thanks, this is working.

                                Now I have another little problem with the format of the data on the report.
                                They are represented separately for each row and I would like to see all records represented in a something like a table format. (each row after another). How can I do this?

                                And another problem is that if I put 30 fields they are all smashed and tighten between them and I can not see anything. How can I solve this issue too?

                                There is printscreen.

                                Thank you.



                                Thanks for the response. It looks like you need to decrease the Detail band height, where the XRLabels (or XRTable) are located. This can be done in Report Designer. Just drag the band's bottom line, or adjust the Height property via the Properties window. Try this approach, and let me know whether this helps.



                                Thank you, I've fixed that issue and it's ok now.

                                I was wondering about the other issue... how can I fit 30 fields (columns) in one report?
                                If I put all of them on the report they are smashed and tighten so much that nothing is possible to be seen on the screen. And that's an issue because I really need all fields on the report.



                                Hi Picot,

                                Thanks for the update. It seems that you want to adjust the page width. If so, you can customize the XtraReport.PaperKind property and select a different paper size. You can also set the PaperKind property to Custom, and then adjust the PageWidth property manually. After that, resize all columns so that they occupy a larger area. Let me know whether this makes sense.


                                To start a chat you should create a support ticket

                                If you need additional product information, write to us at 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