Current filter:
                                You should refresh the page.
                                  • Hello!
                                    There are 4 gridControls with gridViews. I need to export them to one excel file. I know, I can use compositeLink component, but I need to make some configuration of reports' view (add or remove some columns, rename a column caption, create a header band and etc.). So I'll use the reporting.
                                    Could you direct me on the right way to solve the issue?
                                    The project has a dataset with necessary tables.
                                    Here is what I need to get as a result:

                                    1. One exported file.
                                    2. Each table is on the separate sheet.
                                    3. Three grids are portrait orientation, the fourth grid is very wide, so its orientation is landscape or it should have the limitless width.
                                    Is there way to export the report without preview?
                                    Thank you!

                                1 Solution

                                Creation Date Importance Sort by

                                To accomplish this task, create a separate report for each grid. Then create a main a report and use the XRSubreport report to show each child report in the main report. Set the XRSubreport.GenerateOwnPages property to the True value. This allows using different landscape mode for subreports. For each child report, set also the PaperKind property to Custom and the PageHeight property to a large value so the content of each child report can be shown in one page. Create the main report in code and export it to an XLSX file with the XlsxExportOptions.ExportMode property set to SingleFilePageByPage. Should you have further questions, let me know.

                                • Alexander (Sanches) Kotelnikov 11.08.2019

                                  Thank you for the answer!
                                  I tried do it, but I use the version 17.2 (I marked this when creating the ticket) and there is not the GenerateOwnPages property.
                                  And secondly, how to set the datasouce of subreports?
                                  In the case of a single report, I create method Print in the report and send the datasource as a parameter of method:

                                  public void Print(object DataSource) { this.DataSource = DataSource; this.DataMember = null; //..... ReportPrintTool preview = new ReportPrintTool(this); PrintingSystemBase ps = preview.PrintingSystem; preview.ShowRibbonPreview(); }
                                • Alexander (Sanches) Kotelnikov 11.08.2019

                                  I did it: I added to Print() these:

                                  subrep1.ReportSource.DataSource = data1; subrep1.ReportSource.DataMember = ""; subrep1.ReportSource.DataAdapter = null; subrep2.ReportSource.DataSource = data2; subrep2.ReportSource.DataMember = ""; subrep2.ReportSource.DataAdapter = null;

                                  Also I used the xrPageBreak component between subreports instead the GenerateOwnPages property. And I set the PaperKind to Custom and the PageHeight to a large value of the main report also, because without it there are many pages.

                                  I note the following issue: When the name of datasource's field has dot (for example, 'Prev. name'), and when I select the field in the expression of the label or table's cell, or drag the field from the Field List, the name in the square brackets is 'Prev'. If I select field in the expression editor, the name is '[Prev].[ name]'.
                                  Why is it happening? 'Prev. name' is the value of the DataColumn's Caption property. The name of the datacolumn is 'prev_name' , of course, no dots or spaces.

                                • Andrey (DevExpress Support) 11.11.2019

                                  I am happy to hear that you have found a solution for your task for version 17.2. Unfortunately, I couldn't find which version is specified in this ticket, so I provided you with a solution for the latest version (the XRSubreport.GenerateOwnPages property is implemented in version 19.1).
                                  As for your question about a dot in a field name, our reporting tools use a field's DisplayName property to operate with fields and don't support dots in table (query) or field names.

                                • Alexander (Sanches) Kotelnikov 11.11.2019

                                  I think, it's not enough correct to display Captions as field names. First, the captions may not be unique. Secondly, as I said, the caption may contain dots and other symbols.
                                  I have 10 fields, they start with 'Prev.' ('Prev. name', 'Prev. date' etc.). And what I see in the reporting: all cells in the table display 'Prev'. And I don't see which field is bound to the cell (of course, I can open the Designer file, but this is absolutely inconvenient).
                                  Yes, displaying the caption is convinient for end-user. But the programmer uses the reporting controls. So, I suggest adding a switch between the display style (caption or column name, if it's a DataTable). Or another your solutions. But I can't refuse to use dots in the captions.
                                  Thank you!

                                • Andrey (DevExpress Support) 11.12.2019

                                  Our reporting engine uses a dot to separate a table name and a field name. If a table name contains a dot, our engine replaces the dot with underscore. However we cannot do this in the case of a field name since it is loaded from a data schema. I have attached a sample video to illustrate this behavior. So if data fields in your data source have dots, a report can work incorrectly. The only workaround is to use aliases for field names with dots in a query.