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

List of Object as DataSource, One item per page

1 Answer 201 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aubrey Ivan
Top achievements
Rank 1
Aubrey Ivan asked on 07 Nov 2019, 03:04 AM

I have a model that looks like this 

public class APV
{
    public string VendorName { get; set; }
    public DateTimeOffset ReportDate { get; set; }
    public string APV_NO { get; set; }
    public string INV_NO { get; set; }
    public decimal? INV_AMT { get; set; }
    public decimal? TOTAL_DEBIT { get; set; }
    public decimal? TOTAL_CREDIT { get; set; }
    public IEnumerable<AccountStatement> AccountStatements  { get; set; }
}
 
public class AccountStatement
{
    public string AccountCode { get; set; }
 
    public string AccountName { get; set; }
 
    public decimal? Debit { get; set; }
 
    public decimal? Credit { get; set; }
}


but I am passing a list of that object such as

var apvDatas = new List<APV>();
apvDatas.Add(item1);
apvDatas.Add(item2);
apvDatas.Add(item3);

I want to create a one page report per item, so I am expecting a 3 page report with different APV_NO or INV_NO as its own page identifier, I just want to create one page report per item with the same header and footer. 

here how my report looks like when I pass a single object but whenever I pass list of object it looks like this 

expectedperItem.png is what it should like per item
somethingiswrong.png is what is happening whenever I try to pass a list of APV

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 11 Nov 2019, 04:13 PM

Hi Aubrey,

Generally the reports are paged based on the item/group KeepTogether property, section PageBreak property and the rendered item height/width.  In order to force the next item content on the next page consider setting the detail section PageBreak to After. For more information see the Paging and Keep Together help article.

Regards,
Peter
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
Aubrey Ivan
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or