I am trying to print a report with two columns, but the report is only printing one column, and the right half of the page is blank.
I am aware that this may have to do with incorrect margins, but the designer is not giving me any indication of any of my fields (I only have one: [=Fields.Description] which is anchored in the column left,right,top).
It is perplexing to me that the second column is not filled, even though there is enough room.
The report is databound to a complex business object, and the subreport is responsible for printing the detail section with a list of items. As mentioned above, I am printing on the item's description.
What am I doing wrong?
7 Answers, 1 is accepted
The only reason for the erroneous behavior can be the report (detail section) width. You should set the detail section width smaller or equal than the column width. The column width can be calculated as: Page width minus sum of left and right margins minus ColumnSpacing * (ColumnCount - 1). All this should be divided to the ColumnCount.
the Telerik team
The report has a page width of 6.5in (not including margins), and I'm expecting the two columns to show up here, but I only see one.
In the subreport, the detail section has a width of 3in ( tried less than that, too), and the column spacing is 0in. When I click on the detail section in the subreport the designer shows me a width of 3in in the Properties grid. So this should be OK.
I still don't see why the columns don't show in the report.
Do I need to set the column Property on the detail section of the report, or on the detail section of the subreport?
Or as a workaround, can I set the width programatically to make sure that both columns fit?
Multicolumn functionality in our Reporting tool is somewhat limited. It is intended to be used only in the main report because all report sections (excluding Page sections) are rendered in a column-wise layout. In other words, the report is wide only one column. Without additional information about your requirements or the working copy of the project we cannot make any additional suggestions.
the Telerik team
thanks for your reply. The business object I am using for the report is a simple Invoice with Items.
I am creating a Invoice report without problems (only 1 column), and also a second report (what we call a "guide") that contains only the items' descriptions (2 columns).
Right now I am using a subreport to print the invoice's items successfully. For the guide, we need to print a 2-column layout containing only the description of each of the item in the Invoice object.
The Invoice is a class that has a List<Item> of items. Each Item class has a Description Property. It was my understanding that, in order to get access to the collection in the Invoice class I need a subreport. I utilize the NeedsDataSource event to accomplish that.
private void subReport_NeedDataSource( object sender, EventArgs e )
Telerik.Reporting.Processing.SubReport subReport = ( Telerik.Reporting.Processing.SubReport ) sender;
subReport.InnerReport.DataSource = ( ( System.Data.DataRowView ) subReport.DataItem )[ "Items" ];
The problem is that there is only one column, no matter what I do.
How would I access the List<Item> of items from the main report. I would be glad to be able to access it without needing a subreport.
I cannot access it via a -=Fields.Items.Description] in the detail section of the main report. That does not work.
Any ideas or suggestions?
I should disappoint you that the layout you are trying yo achieve is impossible with the multicolumn functionality of our reporting product. As explained in previous post, all sections in the report have the same width and thus you cannot have a separate section with columns.
the Telerik team
I have 2 datasets currently being used. The first dataset has information for report & page header info. The second data set contains a list of items which are to be aranged in groups based on category change. For each code below a category I want to print in columns of 4.
I have tried a sub report (mentioned above to not be working). No matter where I set column count it doesn't work this way. Even a list in the details section (so I can bind a different dataset) of main/parent report doesn't work.
Is there no way to have something repeat outward in columns until width of page reached and then start next row?
Currently this report is killing a lot of trees.