This is a migrated thread and some comments may be shown as answers.

Page break after crossTab

3 Answers 238 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 16 Jan 2019, 08:14 AM

Hi, in the DetailSection of a report I'm trying to add a picture box in a subReport. My problem is that if the CrossTab is really large(spreads across multiple pages), the picture box is printed over the table, and not after it.

this.Detail.Items.AddRange(new ReportItemBase[] { this.Crosstab1, subReport });

This is how I create the subReport:

var subReport = new SubReport();
                    var testReport = new ReportTest();
                    testReport.DetailSection.Items.Add(this.PictureBox);

                    var instanceReport = new InstanceReportSource
                    {
                        ReportDocument = testReport,
                    };
                    subReport.ReportSource = instanceReport;

 

Do you know how can I add a page break after the CrossTab?

 

P.S. In this project I can't use the designer for the reports.

3 Answers, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 21 Jan 2019, 08:01 AM
Hi George,

It is best to avoid creating the reports dynamically. Due to the complex nature of the reports modifying its definition manually can lead to errors due to missing properties, incorrect positioning of the elements etc.
More considerations on this topic are provided in Modifying or Creating a report at Run-Time KB article.

Based on the information and the code snippet, it seems that the sub report areas overlaps with the master report areas as the report items in sub report are having hard-coded positions that are not considered with the layout of the master report.

To see which items overlap, you can serialize the report definition after it is created programmatically. This will allow opening the report created programmatically in the Report Designer, check its layout and see which items' properties need to be modified at run-time.

When report items are added dynamically it is harder to layout them correctly and position of each item must be calculated very carefully. In the Report Designer, you can see where each item is positioned and overlapping areas will be marked with an exclamation mark.

To provide you further suggestions, we would need to check the report definitions of report and sub report together with the custom code used for creating sub report.
Please attach a runnable demo reproducing the problematic output so we can test it locally.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
George
Top achievements
Rank 1
answered on 01 Mar 2019, 08:48 AM

Hi Silviya,

I created the xml with the report but can you tell me how do I open it with the report designer? I downloaded the standalone report designer from telerik but it doesn't support xml files.

0
Silviya
Telerik team
answered on 04 Mar 2019, 12:10 PM
Hello George,

The Standalone Report Designer supports trdp, trbp, trdx file formats that contain report and report book definitions serialized in XML. They are called report containers and the Standalone Report Designer can open them.
For more information, please check XML Report Definition help article.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
George
Top achievements
Rank 1
Answers by
Silviya
Telerik team
George
Top achievements
Rank 1
Share this question
or