Hi there,
I have juts one solution where I have to compute a lot of data.
After computing I have a lot of lists I want to display in a report.
My object looks like this:
--------
List of objects | (contains) =>
|- List of StatusData
|- List of PowerData
|- List of ReferenceData
|- List of Curves
What do you thing is the best practice to get this data in different tables?
Best Regards
Manfred
I have juts one solution where I have to compute a lot of data.
After computing I have a lot of lists I want to display in a report.
My object looks like this:
--------
List of objects | (contains) =>
|- List of StatusData
|- List of PowerData
|- List of ReferenceData
|- List of Curves
What do you thing is the best practice to get this data in different tables?
Best Regards
Manfred
16 Answers, 1 is accepted
0
Hello Manfred,
Peter
the Telerik team
Our suggestion is to nest data items (Report, Table/Crosstab/List and Chart). Bind the report to the master list object with ObjectDataSource component and then bind the nested data items directly to =ReportItem.DataObject.StatusData which retrieves the field data from the report's data source.
All the best,Peter
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Manfred
Top achievements
Rank 2
answered on 03 Apr 2012, 02:39 PM
Hi Peter,
thanks for this hint.
Can you give me a short example? i tried a few things, but nothing worked the way I expected.
Best Regards
Manfred
thanks for this hint.
Can you give me a short example? i tried a few things, but nothing worked the way I expected.
Best Regards
Manfred
0
Hello Manfred,
Peter
the Telerik team
I have attached a sample to illustrate the suggested approach.
Greetings,Peter
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Russell
Top achievements
Rank 1
answered on 05 Apr 2012, 11:58 PM
I have a similar issue. My object looks like this ...
public class ShortLabReportPatient
{
public List<
ReportHeader
> reportHeader { get; set; }
public List<
PatientInfo
> patientInfo { get; set; }
public List<
PatientIdentifiers
> patientIdentifiersList { get; set; }
public List<
rptOrderingFacility
> ofList { get; set; }
public List<
rptOrderingProvider
> opList { get; set; }
public List<
testRequests
> trList { get; set; }
public ShortLabReportPatient()
{
reportHeader = new List<
ReportHeader
>();
patientInfo = new List<
PatientInfo
>();
patientIdentifiersList = new List<
PatientIdentifiers
>();
ofList = new List<
rptOrderingFacility
>();
opList = new List<
rptOrderingProvider
>();
trList = new List<
testRequests
>();
}
}
When I bring it up in the designer in the Data Explorer is shows these lists, but nothing in the lists.
If I drag "PatientInfo" to the designer it shows up as [=Fields.patientInfo] I tried changing it to
[=Fields.patientInfo.Name]. But that generates an error ... Exception has been thrown by the target of an invocation.
How do I reference these nested classes? They go down to three levels deep.
0
Hello Russell,
As my colleague mentioned in the first post, you should nest data items (Report, Table/Crosstab/List). Bind the report to the master list object with ObjectDataSource component and then bind the nested data items directly to =ReportItem.DataObject.patientInfo which retrieves the field data from the report's data source. Then in the nested data item bound to this data source you can use the expression =Fields.Name.
Greetings,
Steve
the Telerik team
As my colleague mentioned in the first post, you should nest data items (Report, Table/Crosstab/List). Bind the report to the master list object with ObjectDataSource component and then bind the nested data items directly to =ReportItem.DataObject.patientInfo which retrieves the field data from the report's data source. Then in the nested data item bound to this data source you can use the expression =Fields.Name.
Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Russell
Top achievements
Rank 1
answered on 06 Apr 2012, 12:37 PM
I am sorry but I need a better example of what your saying. This is my first telerik experience and I am not sure how to do what your saying. I down loaded the example but it only has the c# code. Do you have a full solution as an example? I do not see how to " ... nest data items (Report, Table/Crosstab/List)".
0
Hello Russell,
You can paste the report we've attached in the previous post in the CSharp.ReportLibrary of the Visual Studio examples we ship with the product. Rebuild the project and open the report in the Visual Studio designer to see its layout and how it was built. You can test it by using the Preview Tabs or running one of the applications and select this report to display in the viewer.
To "nest data items" means to have a "master" report which contains other Data Items (items that can display and manipulate data in Telerik Reports). This is no different than other reporting products.
If you are a new user to reporting products in general, we highly recommend reviewing the Designing Reports help section that elaborates on all aspects of the report creation and concepts behind it.
Kind regards,
Steve
the Telerik team
You can paste the report we've attached in the previous post in the CSharp.ReportLibrary of the Visual Studio examples we ship with the product. Rebuild the project and open the report in the Visual Studio designer to see its layout and how it was built. You can test it by using the Preview Tabs or running one of the applications and select this report to display in the viewer.
To "nest data items" means to have a "master" report which contains other Data Items (items that can display and manipulate data in Telerik Reports). This is no different than other reporting products.
If you are a new user to reporting products in general, we highly recommend reviewing the Designing Reports help section that elaborates on all aspects of the report creation and concepts behind it.
Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Russell
Top achievements
Rank 1
answered on 06 Apr 2012, 03:30 PM
Thanks for your quick response.
As soon as I add my datasource, and not even add any fields. If I preview my report I get the following error ...
An error has occurred while processing Table 'list1': An error occurred while invoking data retrieval method. Try restarting VisualStudio. ------------- InnerException ------------- Exception has been thrown by the target of an invocation. ------------- InnerException ------------- The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
I can run unit tests on my object and it returns with all the fields populated just fine. Any ideas?
As soon as I add my datasource, and not even add any fields. If I preview my report I get the following error ...
An error has occurred while processing Table 'list1': An error occurred while invoking data retrieval method. Try restarting VisualStudio. ------------- InnerException ------------- Exception has been thrown by the target of an invocation. ------------- InnerException ------------- The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
I can run unit tests on my object and it returns with all the fields populated just fine. Any ideas?
0
Russell
Top achievements
Rank 1
answered on 06 Apr 2012, 05:16 PM
It must be something with how I have my dataclass defined. Here is my class ... Do you see anything that Telerik does not like?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
namespace Business.CustomEntites
{
[Serializable()]
[DataObject]
public class ShortLabReportPatient
{
public List<
ReportHeader
> reportHeader { get; set; }
public List<
PatientInfo
> patientInfo { get; set; }
public List<
PatientIdentifiers
> patientIdentifiersList { get; set; }
public List<
rptOrderingFacility
> ofList { get; set; }
public List<
rptOrderingProvider
> opList { get; set; }
public List<
testRequests
> trList { get; set; }
public ShortLabReportPatient()
{
reportHeader = new List<
ReportHeader
>();
patientInfo = new List<
PatientInfo
>();
patientIdentifiersList = new List<
PatientIdentifiers
>();
ofList = new List<
rptOrderingFacility
>();
opList = new List<
rptOrderingProvider
>();
trList = new List<
testRequests
>();
}
}
[Serializable()]
[DataObject]
public class ReportHeader
{
public String HeaderLine { get; set; }
public String receivedDate { get; set; }
public ReportHeader()
{
HeaderLine = "Received by PHRED";
}
}
[Serializable()]
[DataObject]
public class PatientInfo
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
public string CityStateZip { get; set; }
public string State { get; set; }
public List<
PhoneNumbers
> phoneList { get; set; }
public string DOBHeader { get; set; }
public string DOBLine { get; set; }
public string GenderHeader { get; set; }
public string GenderLine { get; set; }
public PatientInfo()
{
DOBHeader = "Date of Birth [DOB Raw]; age";
GenderHeader = "Gender/Race/Ethnicity";
phoneList = new List<
PhoneNumbers
>();
}
}
[Serializable()]
[DataObject]
public class PatientIdentifiers
{
public String piHeader { get; set; }
public List<
piLine
> piLines { get; set; }
public string piCentricHeader { get; set; }
public string picLines { get; set; }
public string nokHeader { get; set; }
public List<
nexOfKinLines
> nokLines { get; set; }
public PatientIdentifiers()
{
piHeader = "Patient Identifiers";
piCentricHeader = "Patient-Centric observations";
picLines = "Not defined yet.";
nokHeader = "Next of Kin";
piLines = new List<
piLine
>();
nokLines = new List<
nexOfKinLines
>();
}
}
/// <
summary
>
/// Ordering Facility information
/// </
summary
>
[Serializable()]
[DataObject]
public class rptOrderingFacility
{
public string submitter { get; set; }
public String orderingHeader { get; set; }
public string FacilityName { get; set; }
public string phone { get; set; }
public rptOrderingFacility()
{
orderingHeader = "Ordering Facility";
}
}
/// <
summary
>
/// Ordering Provider information
/// </
summary
>
[Serializable()]
[DataObject]
public class rptOrderingProvider
{
public string submitter { get; set; }
public String orderingHeader { get; set; }
public string providerName { get; set; }
public List<
PhoneNumbers
> phoneList { get; set; }
public rptOrderingProvider()
{
orderingHeader = "Ordering Provider";
phoneList = new List<
PhoneNumbers
>();
}
}
/// <
summary
>
/// Ordering Provider information
/// </
summary
>
[Serializable()]
[DataObject]
public class testRequests
{
// First column of report
public string specimenHeader { get; set; }
public String specimanType { get; set; }
public string collected { get; set; }
public string received { get; set; }
public string accession { get; set; }
public string specimanId { get; set; }
// second column of report
public string orderedHeader { get; set; }
public String desc { get; set; }
public string requestStatus { get; set; }
public string reportDate { get; set; }
public string reason { get; set; }
public string clinicalInfo { get; set; }
public List<
testResults
> resultsList { get; set; }
public List<
Notes
> noteList { get; set; }
public testRequests()
{
specimenHeader = "Specimen";
orderedHeader = "Test Ordered";
resultsList = new List<
testResults
>();
noteList = new List<
Notes
>();
}
}
[Serializable()]
[DataObject]
public class testResults
{
public string testPerformed { get; set; }
public String method { get; set; }
public string results { get; set; }
public string abnormalFlag { get; set; }
public string status { get; set; }
public string analysisDate { get; set; }
public testResults()
{
testPerformed = null;
}
}
/// <
summary
>
/// phone number list
/// </
summary
>
public class PhoneNumbers
{
public string Phone { get; set; }
}
public class piLine
{
public string line { get; set; }
}
public class nexOfKinLines
{
public string nokLine { get; set; }
}
public class Notes
{
public string noteLine { get; set; }
}
}
0
Hello Russell,
Do you use EntityDataSource Component or ObjectDataSource Component and does the error occur only when you try to preview or at runtime as well. Please check the following forum post for more information on this matter.
Regards,
Steve
the Telerik team
Do you use EntityDataSource Component or ObjectDataSource Component and does the error occur only when you try to preview or at runtime as well. Please check the following forum post for more information on this matter.
Regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Russell
Top achievements
Rank 1
answered on 09 Apr 2012, 09:34 PM
I am using ObjectDataSource.
In the preview window I get ...
An error has occurred while processing Report 'ShortDetailReport': An error occurred while invoking data retrieval method. Try restarting VisualStudio.
------------- InnerException -------------
Exception has been thrown by the target of an invocation.
------------- InnerException -------------
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
When I try to run it using the report viewer, at run time ... I get ....
Compiler Error Message: CS0012: The type 'Telerik.Reporting.IReportDocument' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.Reporting, Version=6.0.12.302, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'.
I do have "Telerik.Reporting" as a reference, isn't that were "IReportDocument" is located?
My object datasource is located in a seperate project within the same solution. This object datasource calls our I/O methods that are generated with T4 and Entity framework.
This is so frustrating, I thought telerik was supposed to make this simpiler.
In the preview window I get ...
An error has occurred while processing Report 'ShortDetailReport': An error occurred while invoking data retrieval method. Try restarting VisualStudio.
------------- InnerException -------------
Exception has been thrown by the target of an invocation.
------------- InnerException -------------
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
When I try to run it using the report viewer, at run time ... I get ....
Compiler Error Message: CS0012: The type 'Telerik.Reporting.IReportDocument' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.Reporting, Version=6.0.12.302, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'.
I do have "Telerik.Reporting" as a reference, isn't that were "IReportDocument" is located?
My object datasource is located in a seperate project within the same solution. This object datasource calls our I/O methods that are generated with T4 and Entity framework.
This is so frustrating, I thought telerik was supposed to make this simpiler.
0
Hello Russell,
The used Entity framework model should be located in a separate class library and you should utilize EntityDataSource Component in order for the report designer and the report wizards to work properly. Looking at the stack trace from the screenshot from your other post, the error comes from the fact that you've added your reports directly to a web site project. As instructed in Creating a Simple Report and Solution Structure help articles, the reports should be kept in a separate class library.
Kind regards,
Steve
the Telerik team
The used Entity framework model should be located in a separate class library and you should utilize EntityDataSource Component in order for the report designer and the report wizards to work properly. Looking at the stack trace from the screenshot from your other post, the error comes from the fact that you've added your reports directly to a web site project. As instructed in Creating a Simple Report and Solution Structure help articles, the reports should be kept in a separate class library.
Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Russell
Top achievements
Rank 1
answered on 11 Apr 2012, 03:25 AM
Thanks Steve.
I have moved the report to its own project, and refactorred my code to use the entityDatasource instead. I am now able to get data.
I have one more question. In an earlier post there was a sample on how to access nested generic lists. I also, got that to work. My question is, is there a way for the nested list fields to show up in the Data Explorer? I can type them in the expressions, but it would be easier if I could drag and drop them.
Thanks.
I have moved the report to its own project, and refactorred my code to use the entityDatasource instead. I am now able to get data.
I have one more question. In an earlier post there was a sample on how to access nested generic lists. I also, got that to work. My question is, is there a way for the nested list fields to show up in the Data Explorer? I can type them in the expressions, but it would be easier if I could drag and drop them.
Thanks.
0
Hello Russell,
Unfortunately no. Setting the data source through bindings means that this code would be executed at runtime and the designer does not know anything about the binding, respectively cannot get schema of your data.
Kind regards,
Steve
the Telerik team
Unfortunately no. Setting the data source through bindings means that this code would be executed at runtime and the designer does not know anything about the binding, respectively cannot get schema of your data.
Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Manfred
Top achievements
Rank 2
answered on 16 Apr 2012, 02:55 PM
Hi Peter,
thanks for your example, it worked fine for me, I increased the performance of my reports and everything works perfect.
Best Regards
Manfred
thanks for your example, it worked fine for me, I increased the performance of my reports and everything works perfect.
Best Regards
Manfred
0
Roland
Top achievements
Rank 1
answered on 24 Sep 2012, 11:16 AM
Hello
I am in a similar situation, with the difference that I would need to provide a Parameter to the nested item, so that it returns items depending on that value.
E.g. I have a Booking main entity, with BookingId property and it has a collection of Goods entities and a collection of SubBooking entities. Goods entity is also linked to a SubBooking. I need to list the Goods grouped by SubBooking.Id.
So the structure could look something like this:
Booking -> SubBooking 1 -> Goods 1
-> Goods 3
Booking -> SubBooking 2 -> Goods 2
-> Goods 4
So I pass the Goods container the SubBookingId parameter.
Is the solution presented in this thread applicable in this case or there is another practice for this?
Regards,
Roland
I am in a similar situation, with the difference that I would need to provide a Parameter to the nested item, so that it returns items depending on that value.
E.g. I have a Booking main entity, with BookingId property and it has a collection of Goods entities and a collection of SubBooking entities. Goods entity is also linked to a SubBooking. I need to list the Goods grouped by SubBooking.Id.
So the structure could look something like this:
Booking -> SubBooking 1 -> Goods 1
-> Goods 3
Booking -> SubBooking 2 -> Goods 2
-> Goods 4
So I pass the Goods container the SubBookingId parameter.
Is the solution presented in this thread applicable in this case or there is another practice for this?
Regards,
Roland