Hello,
I am new in telerik. I would like to figure data + collection in one Report from my Bussiness object.
for example (it is only example but it describes my situation):
I have this classes:
public class Thing
{
public string Name {get; set;}
public string Price {get; set;}
}
public class Person
{
public string Name {get; set;}
public string SurName{get; set;}
public List<Thing> Things{get; set;}
}
result should be something like this:
--------------------------
name + surname John Novak
things
Car $100
Toilet paper 42
Mask $20
--------------------------
My question is, how do I figure out information about one person and person's things at the one report. I investigated "Telerik reporting tep by step" guide, but it deals only with database.
I am creating PDF from my bussiness object and I really don't know how to bind subreport. I investigated that I can use subreports: Master report will show name + surname and subreport will show things.
Question is how to fill DataSource of subreport.
My method for creating report is :
I am new in telerik. I would like to figure data + collection in one Report from my Bussiness object.
for example (it is only example but it describes my situation):
I have this classes:
public class Thing
{
public string Name {get; set;}
public string Price {get; set;}
}
public class Person
{
public string Name {get; set;}
public string SurName{get; set;}
public List<Thing> Things{get; set;}
}
result should be something like this:
--------------------------
name + surname John Novak
things
Car $100
Toilet paper 42
Mask $20
--------------------------
My question is, how do I figure out information about one person and person's things at the one report. I investigated "Telerik reporting tep by step" guide, but it deals only with database.
I am creating PDF from my bussiness object and I really don't know how to bind subreport. I investigated that I can use subreports: Master report will show name + surname and subreport will show things.
Question is how to fill DataSource of subreport.
My method for creating report is :
var dp = new DataProvider();
var myReport = new Report1();
myReport.DataSource = dp;
//!!!! Is tehere way, how to say, that Report2 (which is subreport in Report 1) will be filled by dp.SomeCollection
string mimType = string.Empty;
string extension = string.Empty;
Encoding encoding = null;
byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render(
"PDF", myReport, null, out mimType, out extension, out encoding);
FileStream fs = new FileStream("c:\\reportWithExternalDataSource.pdf", FileMode.Create);
fs.Write(buffer, 0, buffer.Length);
fs.Flush();
fs.Close();
I hope I described my problem. Can anybody help me please.
thanks
kure256