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

Multiple Subreports ?

12 Answers 246 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Salzlechner
Top achievements
Rank 1
Michael Salzlechner asked on 06 Dec 2010, 12:12 AM
Should i be able to use multipe subreports in a report ?

i have a reports on a DataSet created from an XML file. The main report is on table A. The first subreport is on table B. I created a second subreport and set its datasource to table C but it always shows the data from table B

i am using the NeedDataSource event in the main report to load the xml file and set the datasource of the main report to its table

i am also using the NeedDataSource event for each subreport to set their datasources.

no matter what i do the second subreport always shows the same data as the first subreport

is it not possible to have multiple subreports ?

thanks

Mike


12 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 06 Dec 2010, 09:05 AM
Hello Michael,

This is a known issue that slipped into the Q3 release and has been immediately addressed in an internal build, which is available for download from your account.

Please excuse us for the temporary inconvenience.

Best wishes,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
Michael Salzlechner
Top achievements
Rank 1
answered on 06 Dec 2010, 03:12 PM
ok downloaded the internal build

Now all my reports i already built are failing with the following error

Error 23 Invalid Resx file. Type Telerik.Reporting.Drawing.Unit, Telerik.Reporting, Version=4.2.10.1110, Culture=neutral, PublicKeyToken=a9d7983dfcc261be in the data at line 120, position 4 cannot be located. Line 122, position 5. C:\.....\XMLReferralBillingCodes.resx 122 5 ProvXMLReports


0
Michael Salzlechner
Top achievements
Rank 1
answered on 06 Dec 2010, 03:37 PM
Running the upgrade wizard solved all the errors and now multiple subreports work fine, thanks
0
Oliver
Top achievements
Rank 1
answered on 21 Dec 2010, 05:33 PM
Hello,

I had the same problem.
So I downloaded internal builds Version=4.2.10.1215
I had run the upgrade wizard.Version "4.2.10.1110" has been replaced by "4.2.10.1215" but since it does not work anymore.
In my ReportViewer, it's always shows "No report".

Why ?

Regards,
Oliver
0
Rayne
Top achievements
Rank 1
answered on 15 Dec 2011, 02:46 PM
I'm having this same error on my build machine, but on my local machine everything works as expected.

Any clue as to what's going on?
0
Steve
Telerik team
answered on 15 Dec 2011, 02:54 PM
Hi Rayne,

This problem has been fixed one year ago - make sure the assemblies on your build machine are not from the Q3 2010 release, rather they use the latest version.

Regards,
Steve
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Rayne
Top achievements
Rank 1
answered on 15 Dec 2011, 03:04 PM
I'm having trouble with my build machine not finding the correct version of the Reporting dll, so maybe I'm getting the errors because it's still trying to use an old version. I will look into it. Thanks.
0
PAGCA
Top achievements
Rank 1
answered on 15 Apr 2014, 07:07 PM
Michael - Could you post the code you are using in the NeedDataSource Event to get different data into the different subreports?
I have not been able to get this to work.
Thanks
0
Michael Salzlechner
Top achievements
Rank 1
answered on 15 Apr 2014, 08:00 PM
Don

i simply set the datasource for each report

goalsSubreport.ReportSource.DataSource = ds.Tables["Goal"];

where ds is my dataset containing all the tables

hth

Mike

0
PAGCA
Top achievements
Rank 1
answered on 15 Apr 2014, 08:13 PM
Thanks Mike. That is what I'm doing but I end up with the same data in each of the subreports.

​Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
Dim mymainreport As New FinanceReports.RCContractsReport()
instanceReportSource.ReportDocument = mymainreport

Dim sub1Base As ReportItemBase() = mymainreport.Items.Find("NewContracts", True)
Dim sr1 As SubReport = DirectCast(sub1Base(0), SubReport)
Dim irs1 As InstanceReportSource = TryCast(sr1.ReportSource, InstanceReportSource)
irs1.Parameters.Add(New Telerik.Reporting.Parameter("Title", "New Contracts"))
Dim rsd1 As Report = TryCast(irs1.ReportDocument, Report)
rsd1.DataSource = oDataAdapter1

Dim sub2Base As ReportItemBase() = mymainreport.Items.Find("ExtendedContracts", True)
Dim sr2 As SubReport = DirectCast(sub2Base(0), SubReport)
Dim irs2 As InstanceReportSource = TryCast(sr2.ReportSource, InstanceReportSource)
irs2.Parameters.Add(New Telerik.Reporting.Parameter("Title", "Extended Contracts"))
Dim rsd2 As Report = TryCast(irs2.ReportDocument, Report)
rsd2.DataSource = oDataAdapter2

Dim sub3Base As ReportItemBase() = mymainreport.Items.Find("ConcludedContracts", True)
Dim sr3 As SubReport = DirectCast(sub3Base(0), SubReport)
Dim irs3 As InstanceReportSource = TryCast(sr3.ReportSource, InstanceReportSource)
irs3.Parameters.Add(New Telerik.Reporting.Parameter("Title", "Concluded Contracts"))
Dim rsd3 As Report = TryCast(irs3.ReportDocument, Report)
rsd3.DataSource = oDataAdapter3
0
Michael Salzlechner
Top achievements
Rank 1
answered on 15 Apr 2014, 08:24 PM
I double checked my code but I don't see anything special. I am sure by now you are not using the binaries that had the bug so I am not sure what else it could be
0
PAGCA
Top achievements
Rank 1
answered on 15 Apr 2014, 08:33 PM
I am using 7.2.13.1016.
Tags
General Discussions
Asked by
Michael Salzlechner
Top achievements
Rank 1
Answers by
Steve
Telerik team
Michael Salzlechner
Top achievements
Rank 1
Oliver
Top achievements
Rank 1
Rayne
Top achievements
Rank 1
PAGCA
Top achievements
Rank 1
Share this question
or