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

SubReports

10 Answers 206 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
MiddleTommy
Top achievements
Rank 1
MiddleTommy asked on 16 Nov 2010, 08:14 PM
I have a report that takes 5 copies of a subreport and feeds it different data in the NeedsDataSource event.
lets call them subreport1 through subreport5
in Q2 this worked fine.
In Q3 subreport1 is displayed where ever the subreports 2 - 5 should be displayed. They have a conditional visibility.

Perhaps using one reference to a subreport multiple times is prohibited in the Q3 release?

10 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Nov 2010, 04:17 PM
Hello MiddleTommy,

We are not sure we understand your inquiry, however multiple SubReport items still can reference the same report in Q3. Generally unexpected behavior may occur if your SubReports Name properties are not serialized and because in Q3 we have introduced report data cashing (to improve the performance for the interactivity features) the name properties are required. Thus our suggestion is to change your Subreports Name property to a custom name - this way you will force the name property serialization.

For further assistance we will highly appreciate if you open a support ticket and send us a sample runnable project that exhibits the issue so we can test it locally.

Regards,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
MiddleTommy
Top achievements
Rank 1
answered on 19 Nov 2010, 08:20 PM
I uploaded a sample that demonstrates this problem to PITS
0
Thomas
Top achievements
Rank 1
answered on 24 Nov 2010, 10:06 PM
Hello ..

I have a similar problem. In my report (master / detail) in the detail section 2 are passing away sub reports with different data sources. Unfortunately, the rendering of the report for both reports the same data source provided. I can resolve the issue through the info in the post before but if I change at any change on the subreport also the name of the report. But when I compile 2 times without changing the name of the report does not call the master of the reports.
0
Steve
Telerik team
answered on 25 Nov 2010, 05:20 PM
Hi Thomas,

We've released an internal build that addresses the problem with the unique names. You can download the fix directly from your account, see the release notes here.

All the best,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Sergiu
Top achievements
Rank 2
answered on 11 Mar 2011, 05:26 PM
I am having the same exact problem. I have a series of labels that I am dynamically populating with data... If i debug, I can tell the data passed as datasource to the subreport instance is different for each instance... Renders the same exact data for every instance... I have installed the latest internal build and it does not solve the problem. Have you found a solution yet? Thanks!
0
MiddleTommy
Top achievements
Rank 1
answered on 11 Mar 2011, 05:57 PM
you have to add a new subreport for each instance of the subreport you have in the report
you can not copy and paste sub reports.
You should see a sub report at the bottom of the designer for each instance of the subreport (even if it is the same subreport used multiple times you should have that same amount of subreports in the bottom of the designer)

That fixed it for me.
0
Sergiu
Top achievements
Rank 2
answered on 11 Mar 2011, 05:59 PM
Thanks for your reply... i just fixed my issue!

The problem I had was...

 

 

Dim rptLabelSubreport As SubReport = New SubReport

 

rptLabelSubreport.ReportSource =

 

New EHSReporting2011.WM_PickupLabelsChild

 

rptLabelSubreport.Name =

 

"rptLabel" & i & "_WM_PickupLabelsChild"

 


and this fixed it... (I use i as an integer variable to differentiate between the subreport instances)

 

 

Dim rptLabelSubreport As SubReport = New SubReport

 

rptLabelSubreport.ReportSource =

 

New EHSReporting2011.WM_PickupLabelsChild

 

rptLabelSubreport.ReportSource.Name =

 

"rptLabel" & i & "_WM_PickupLabelsChild"

 

0
Macloud
Top achievements
Rank 1
answered on 02 May 2012, 06:31 PM
I'm using the Q1 2012 version of Telerik Reporting.  I'm creating a report with 3 subreports in the detail section - the first two subreports are different, but the 3rd is the same class as used in the first.  When I run the report generator I get the "Object should have unique names" error.  I'm adding the subreports via the designer, not programmatically.  I made sure that the name property for each subreport is unique.  In looking at the Component Designer generated code, I can see that it creates new instances of the subreport class for each of the duplicated subreports in the detail section, but it sets the name property of each subreport object to the same literal.  Is there some property I need to set on the subreport items to force unique naming?  I've attached a snippet of the Component Designer generated code - the re-used report class name is "LimitedMeasurementRpt"  and the instance names are "limitedMeasurementRpt1" and "limitedMeasurementRpt2".  Any guidance here would be appreciated.
0
Steve
Telerik team
answered on 03 May 2012, 08:01 AM
Hi Macloud,

This was a bug that we have addressed in the latest internal build available for download in your account. Upgrade to resolve the issue.

Sorry for the temporary inconvenience.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Macloud
Top achievements
Rank 1
answered on 03 May 2012, 08:36 PM
Upgrading to the internal build fixed the issue - thanks!
Tags
General Discussions
Asked by
MiddleTommy
Top achievements
Rank 1
Answers by
Peter
Telerik team
MiddleTommy
Top achievements
Rank 1
Thomas
Top achievements
Rank 1
Steve
Telerik team
Sergiu
Top achievements
Rank 2
Macloud
Top achievements
Rank 1
Share this question
or