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

SubReport with two columns only prints one

7 Answers 254 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 11 Aug 2009, 10:27 AM
Hi

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

Sort by
0
Hrisi
Telerik team
answered on 12 Aug 2009, 12:54 PM
Hi Timothy Rischbieter,

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.

Sincerely yours,
Hrisi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tim
Top achievements
Rank 1
answered on 16 Aug 2009, 07:36 AM
In my case the two columns are in the detail section of a subreport. The subreport itself is docked to the full page width on the parent report.
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?
0
Hrisi
Telerik team
answered on 19 Aug 2009, 02:59 PM
Hi Timothy Rischbieter,

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.

Kind regards,
Hrisi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tim
Top achievements
Rank 1
answered on 24 Aug 2009, 01:56 PM
Hi,

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?

0
Hrisi
Telerik team
answered on 27 Aug 2009, 12:38 PM
Hi Timothy Rischbieter,

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.

Greetings,
Hrisi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
pylacroix
Top achievements
Rank 1
answered on 13 Oct 2009, 06:01 PM
is this something that will be part of a future release (allowing a sub report to have multiple columns) ?
0
Mike Hobbs
Top achievements
Rank 1
answered on 25 Jul 2010, 06:31 PM
I would like to say that I too am looking for a feature similar to this request.  Is there anyway in the current release (Q2 2010) that will allow more complex columns on reports?

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.

Thank-you,

Mike
Tags
General Discussions
Asked by
Tim
Top achievements
Rank 1
Answers by
Hrisi
Telerik team
Tim
Top achievements
Rank 1
pylacroix
Top achievements
Rank 1
Mike Hobbs
Top achievements
Rank 1
Share this question
or