The problem is this report breaks into two pages(or more) when I do the html preview, I do not want that, as this report is part of a report book, and creates "ghost" extra report(s) in the list of reports in the report book. Most of my other reports are made with list objects so they do not break in many pages at html preview, ONLY when I do the print preview, which is just fine.
The map of objects for the current report is shown in map_old.jpg
Find the desired report's output at desired_preview.jpg (I did some image editing to get this)
I would like to use a list object of some sort to accomplish something similar, so that the html preview (or just interactive preview) DOES NOT break into multiple pages.
How do I do that?.
8 Answers, 1 is accepted
This is a quote of the answer of your support ticket on the same question:
"Using a single Table item will cause the report to be rendered in a single page in Interactive preview. You can find attached a sample report definition illustrating the suggested. Notice there is a row group defining the size of the group(per how many rows to have headers and empty row below the group), the rest is styling of items to achieve the desired layout."
I hope this helps.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
1) It looks as if the first column (with [Fields.ID] has all the rows merged. How do I merge rows? I don't see that option.
2) it looks as if there's an extra third row. Should I add an extra row at the bottom of the original 2-row table?. is it inside the group? or outside the group?.
could you give the steps to build such a table?
regards,
but when I click on Preview I get this message
"Object reference not set to an instance of an object."
I also did the DataTable/GetData Data Source hookup as shown in the Sample.
what am I doing wrong?
1) Drag a table on the designer. It will be a 3 column x 2 rows table originally. 1st row will be headers, 2nd row will be data.
2) Make sure you have the GetData function on the report class that will feed the table as a DataTable object like this:
public
DataTable GetData()
{
var table =
new
DataTable();
table.Columns.Add(
"ID"
,
typeof
(
int
));
table.Columns.Add(
"Day Plan"
);
for
(
int
i = 0; i < 128; i++)
table.Rows.Add(i,
"Some day plan"
+ i.ToString());
return
table;
}
3) Now hook up this function with the DataSource property of the table. Add an ObjectDataSource to the report and go to the wizard and point to this function.
4) Right click on the data row (2nd) and do "Insert Row" > "Outside Group - Above"
5) Right click on the same data row (now the 3rd) and do "Insert Row" > "Outside Group - Below"
6) On the group explorer, go to (Detail), click on the "..." button and do "Add Group" > "Parent Group", click on New, and select "= Fields.ID" from the drop down (it will be there if you hooked the data source), click on OK
7) Delete the 1st Row (Header row), right click and do "Delete Rows"
8) Click on the 1st Column, 1st Row, and press click delete, that will remove the text.
9) Using shift, click on the cells of the 1st column, right click and do "Merge Cells"
10) Put the desired text title on the (2nd column, 1st row), (3rd column, 1st row), .... and so on.
11) Put the desired data fields on the (2nd column, 2nd row), (2nd column, 2nd row), .... and so on
12) You might delete the last column as you only have two fields to show on this sample.
13) Merge cells (c:2, r:3), (c:3, r:3)
14) Hide 1st column (Fields.ID), change Visible property from True to False.
15) Edit Grouping on the Group explorer, click on "..." on the Grouping column, change "=Fields.ID" to "=Fields.ID/8"
16) Adjust cells sizes. Compile. and try it (click Preview)
Here are the steps to create the Table item definition from the example:
- Define some data and wrap it with data source component(ObjectDataSource component in the example);
- Add a Table item with two columns (ID and DayPlan). Notice you do not need header cells, only two cells for the specified fields;
- Select the Table item and open the Group Explorer
- Add parent group to the Detail - the grouping expression determines the size of the groups. The following expression =Fields.ID/8 determines a group of 8 records, where Id is a consecutive number starting from zero. The expression can be adjusted according to your data.
- Select the newly added TextBox item for the parent group, right click and in the Context Menu select Insert Row -> Inside group - Above, then Insert Row -> Outside group - Below;
- Style the Upper row as header, e.g. gray background color, then style the middle row to have borders around items in it.
- Finally hide the item in the parent group by setting its Visible property to false and its ColumnWidth to small value.
I hope this points you into the right direction.
Regards,
Stef
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
Hi,
I'm have a table list.
var table = new DataTable();
table.Columns.Add("Level1");
table.Columns.Add("Level2");
table.Columns.Add("Level3");
table.Columns.Add("Grade");
foreach (var gradedC in getUserProfileResponse.UserCV.AllGradedCompetences)
{
if (gradedC.InCV)
{
table.Rows.Add(gradedC.TjanstomradeNamn, gradedC.KompetensomradeNamn, gradedC.SpecialistkompetensNamn, gradedC.Betyg);
}
}
var table1 = new DataTable();
this.GetData = table;
See the image For grouping parent and Child
Here the result:
IT och Systemutveckling
Certifieringar IT (3 och
över = certifierad)
Microsoft - 70-316 Developing
3
Microsoft - 70-483 Programming in C# 3
Databaser
MS SQL Server 3
Based on your screenshot, there row groups in table8 (Table item, where the Level2 grouping is not dynamic as the grouping lacks an '=' sign that turns it into expression and 'Level2' will be taken as a static string value. For more details, please check Understanding Detail and Grouped Data.
If you need further help, please elaborate on the used data and the current and the desired result on preview.
Regards,
Stef
Telerik