Showing posts with label sub. Show all posts
Showing posts with label sub. Show all posts

Friday, February 17, 2012

Error: Subreport could not be shown 2

Hi
I have a "master" report that has 10 chart sub reports that don't have any
parameter. I get a "Error: Subreport could not be shown" error if one of
them are snapshot based.
Any ideas?
Regards,
AndresOn Apr 14, 8:12 pm, "Andres" <andresfon...@.hotmail.com> wrote:
> Hi
> I have a "master" report that has 10 chart sub reports that don't have any
> parameter. I get a "Error: Subreport could not be shown" error if one of
> them are snapshot based.
> Any ideas?
> Regards,
> Andres
You might be able to resolve this error by returning a default empty
resultset. Also, make sure that all the dependencies of the subreport
are available (i.e., if you are developing reports in a development
environment and then need to transfer them to the production
environment along w/all dependent stored procedures, tables, etc).
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi Enrique
Which report should return a default empty resultset?
And, what's a default empty resultset?
The main report don't have any resultset. I think sub reports have all they
need. They work fine when I use them directly in default mode (no snapshot)
and in snapshot mode.
Regards,
Andrés
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1176659677.215808.157620@.e65g2000hsc.googlegroups.com...
> On Apr 14, 8:12 pm, "Andres" <andresfon...@.hotmail.com> wrote:
>> Hi
>> I have a "master" report that has 10 chart sub reports that don't have
>> any
>> parameter. I get a "Error: Subreport could not be shown" error if one of
>> them are snapshot based.
>> Any ideas?
>> Regards,
>> Andres
>
> You might be able to resolve this error by returning a default empty
> resultset. Also, make sure that all the dependencies of the subreport
> are available (i.e., if you are developing reports in a development
> environment and then need to transfer them to the production
> environment along w/all dependent stored procedures, tables, etc).
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>

Error: Subreport could not be shown

I am a new one in using ReportViewer in VS 2005. I try to use Main and Sub report to show data from my dataset. It doesn't matter if I use main report only, but the problem is when I use subreport intergrated with the main report. When I run it in browser, it shows:

Error: Subreport could not be shown

The main report is ok.Is there any solution to the problem?

Thank for your help!!!!

Hello,

Are you able to view the subreport if you navigate to it directly? If so, you probably havean issue with the subreport reference in the parent report.|||

hi mike,

How can we set sub report references in the parent report of reportviewer?

If you have a ready code or steps pls post since its urgent.

thanks and regards,

unni

|||

http://gotreportviewer.com has some examples of using subreports. Have you looked at those?

-Albert

|||

hi albert,

i tried the url and i used the code meant for subreport processing but the event doesnt get fired.

the dataset for subreport can only be set if the event gets fired. i will attach the code to make it more clear

Dim params(3) As ReportParameter
params(0) = New ReportParameter("ClientName", CStr(Session("ClientID")))
params(1) = New ReportParameter("Service", CStr(Session("ServicePeriodID")))
params(2) = New ReportParameter("FullName", CStr(Session("FullName")))
params(3) = New ReportParameter("ServiceName", CStr(Session("Period")))

Me.rvBusinessInc.ProcessingMode = ProcessingMode.Local
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t1", DSBIReport))
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t2", DSAgency))
AddHandler rvBusinessInc.LocalReport.SubreportProcessing, AddressOf LocalReport_SubreportProcessing

rvBusinessInc.LocalReport.SetParameters(params)
rvBusinessInc.LocalReport.Refresh()

I'm still gettin the error assubreport cannot be found.
thanks and regards,
unni
|||

Run your website in the debugger and enable catching all exceptions. Are any exceptions being throwh?

-Albert

|||

Hi,

I ran into same problem and found the follwoing two reasons for subreport error:

1. Make sure that all the parameters of the subreport have been assigned a value during design

2. Also, if you are referencing/using any external DLLs or classes from .Net Framerwork (see references tab in report properties dialog) then make sure that you confugure report viewer control for that.

Good Luck!

Naqsh

|||Hi,
I am having a lot of trouble with the report viewer as well. No matter what I try I get Error: Subreport cannot be displayed.
This is the latest code that i am using:

Imports Microsoft.Reporting.WebForms

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'Wire up the event that will allow us to bind the sub report
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ReportViewer_SubreportProcessing
ReportViewer1.LocalReport.Refresh()

End Sub

Private Sub ReportViewer_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim params(1) As ReportParameter
params(0) = New ReportParameter("questionid", CStr(e.Parameters("questionid").ToString))
ReportViewer1.LocalReport.SetParameters(params)
ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", ObjectDataSource2))
End Sub

End Class

|||

Hi,

First, You should not be using subreportprocessing event to set the main report parameters.

Does your report has one subreport or more than one? Look at the example code which comes with VS 2005.

Naqsh

|||I am just building some test reports to get an idea of how it all works but my project report has 3 subreports.|||

Nope I can't see anyway to set the subreport parameters from id values passed from the Main report. Can you post an example of how this is done. There are no examples of how to do this anywhere. They all gloss over this unless it means you don't have to in which case my report has some other problem.

Thanks very much.

|||Don't know if you are still struggling with this one, but passing parameters to subreports is simply a case of right click on the subreport where you have included it in the main report, open the Properties and Parameters Tab and specify the link between the main and subreport. As long as you have set up the correct filter in the subreport design itself, you should just be able to pick from the drop downs and choose the corresponding column to assign it to from the main dataset.....

Error: Subreport could not be shown

I am a new one in using ReportViewer in VS 2005. I try to use Main and Sub report to show data from my dataset. It doesn't matter if I use main report only, but the problem is when I use subreport intergrated with the main report. When I run it in browser, it shows:

Error: Subreport could not be shown

The main report is ok.Is there any solution to the problem?

Thank for your help!!!!Hello,

Are you able to view the subreport if you navigate to it directly? If so, you probably havean issue with the subreport reference in the parent report.|||

hi mike,

How can we set sub report references in the parent report of reportviewer?

If you have a ready code or steps pls post since its urgent.

thanks and regards,

unni

|||

http://gotreportviewer.com has some examples of using subreports. Have you looked at those?

-Albert

|||

hi albert,

i tried the url and i used the code meant for subreport processing but the event doesnt get fired.

the dataset for subreport can only be set if the event gets fired. i will attach the code to make it more clear

Dim params(3) As ReportParameter


params(0) = New ReportParameter("ClientName", CStr(Session("ClientID")))
params(1) = New ReportParameter("Service", CStr(Session("ServicePeriodID")))
params(2) = New ReportParameter("FullName", CStr(Session("FullName")))
params(3) = New ReportParameter("ServiceName", CStr(Session("Period")))

Me.rvBusinessInc.ProcessingMode = ProcessingMode.Local
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t1", DSBIReport))
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t2", DSAgency))
AddHandler rvBusinessInc.LocalReport.SubreportProcessing, AddressOf LocalReport_SubreportProcessing

rvBusinessInc.LocalReport.SetParameters(params)
rvBusinessInc.LocalReport.Refresh()

I'm still gettin the error as subreport cannot be found.
thanks and regards,
unni

|||

Run your website in the debugger and enable catching all exceptions. Are any exceptions being throwh?

-Albert

|||

Hi,

I ran into same problem and found the follwoing two reasons for subreport error:

1. Make sure that all the parameters of the subreport have been assigned a value during design

2. Also, if you are referencing/using any external DLLs or classes from .Net Framerwork (see references tab in report properties dialog) then make sure that you confugure report viewer control for that.

Good Luck!

Naqsh

|||Hi,
I am having a lot of trouble with the report viewer as well. No matter what I try I get Error: Subreport cannot be displayed.
This is the latest code that i am using:

Imports Microsoft.Reporting.WebForms

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'Wire up the event that will allow us to bind the sub report
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ReportViewer_SubreportProcessing
ReportViewer1.LocalReport.Refresh()

End Sub

Private Sub ReportViewer_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim params(1) As ReportParameter
params(0) = New ReportParameter("questionid", CStr(e.Parameters("questionid").ToString))
ReportViewer1.LocalReport.SetParameters(params)
ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", ObjectDataSource2))
End Sub

End Class

|||

Hi,

First, You should not be using subreportprocessing event to set the main report parameters.

Does your report has one subreport or more than one? Look at the example code which comes with VS 2005.

Naqsh

|||I am just building some test reports to get an idea of how it all works but my project report has 3 subreports.|||

Nope I can't see anyway to set the subreport parameters from id values passed from the Main report. Can you post an example of how this is done. There are no examples of how to do this anywhere. They all gloss over this unless it means you don't have to in which case my report has some other problem.

Thanks very much.

|||Don't know if you are still struggling with this one, but passing parameters to subreports is simply a case of right click on the subreport where you have included it in the main report, open the Properties and Parameters Tab and specify the link between the main and subreport. As long as you have set up the correct filter in the subreport design itself, you should just be able to pick from the drop downs and choose the corresponding column to assign it to from the main dataset.....

Error: Subreport could not be shown

I am a new one in using ReportViewer in VS 2005. I try to use Main and Sub report to show data from my dataset. It doesn't matter if I use main report only, but the problem is when I use subreport intergrated with the main report. When I run it in browser, it shows:

Error: Subreport could not be shown

The main report is ok.Is there any solution to the problem?

Thank for your help!!!!Hello,

Are you able to view the subreport if you navigate to it directly? If so, you probably havean issue with the subreport reference in the parent report.|||

hi mike,

How can we set sub report references in the parent report of reportviewer?

If you have a ready code or steps pls post since its urgent.

thanks and regards,

unni

|||

http://gotreportviewer.com has some examples of using subreports. Have you looked at those?

-Albert

|||

hi albert,

i tried the url and i used the code meant for subreport processing but the event doesnt get fired.

the dataset for subreport can only be set if the event gets fired. i will attach the code to make it more clear

Dim params(3) As ReportParameter


params(0) = New ReportParameter("ClientName", CStr(Session("ClientID")))
params(1) = New ReportParameter("Service", CStr(Session("ServicePeriodID")))
params(2) = New ReportParameter("FullName", CStr(Session("FullName")))
params(3) = New ReportParameter("ServiceName", CStr(Session("Period")))

Me.rvBusinessInc.ProcessingMode = ProcessingMode.Local
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t1", DSBIReport))
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t2", DSAgency))
AddHandler rvBusinessInc.LocalReport.SubreportProcessing, AddressOf LocalReport_SubreportProcessing

rvBusinessInc.LocalReport.SetParameters(params)
rvBusinessInc.LocalReport.Refresh()

I'm still gettin the error as subreport cannot be found.
thanks and regards,
unni

|||

Run your website in the debugger and enable catching all exceptions. Are any exceptions being throwh?

-Albert

|||

Hi,

I ran into same problem and found the follwoing two reasons for subreport error:

1. Make sure that all the parameters of the subreport have been assigned a value during design

2. Also, if you are referencing/using any external DLLs or classes from .Net Framerwork (see references tab in report properties dialog) then make sure that you confugure report viewer control for that.

Good Luck!

Naqsh

|||Hi,
I am having a lot of trouble with the report viewer as well. No matter what I try I get Error: Subreport cannot be displayed.
This is the latest code that i am using:

Imports Microsoft.Reporting.WebForms

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'Wire up the event that will allow us to bind the sub report
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ReportViewer_SubreportProcessing
ReportViewer1.LocalReport.Refresh()

End Sub

Private Sub ReportViewer_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim params(1) As ReportParameter
params(0) = New ReportParameter("questionid", CStr(e.Parameters("questionid").ToString))
ReportViewer1.LocalReport.SetParameters(params)
ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", ObjectDataSource2))
End Sub

End Class

|||

Hi,

First, You should not be using subreportprocessing event to set the main report parameters.

Does your report has one subreport or more than one? Look at the example code which comes with VS 2005.

Naqsh

|||I am just building some test reports to get an idea of how it all works but my project report has 3 subreports.|||

Nope I can't see anyway to set the subreport parameters from id values passed from the Main report. Can you post an example of how this is done. There are no examples of how to do this anywhere. They all gloss over this unless it means you don't have to in which case my report has some other problem.

Thanks very much.

|||Don't know if you are still struggling with this one, but passing parameters to subreports is simply a case of right click on the subreport where you have included it in the main report, open the Properties and Parameters Tab and specify the link between the main and subreport. As long as you have set up the correct filter in the subreport design itself, you should just be able to pick from the drop downs and choose the corresponding column to assign it to from the main dataset.....

Error: Subreport could not be shown

I am a new one in using ReportViewer in VS 2005. I try to use Main and Sub report to show data from my dataset. It doesn't matter if I use main report only, but the problem is when I use subreport intergrated with the main report. When I run it in browser, it shows:

Error: Subreport could not be shown

The main report is ok.Is there any solution to the problem?

Thank for your help!!!!Hello,

Are you able to view the subreport if you navigate to it directly? If so, you probably havean issue with the subreport reference in the parent report.|||

hi mike,

How can we set sub report references in the parent report of reportviewer?

If you have a ready code or steps pls post since its urgent.

thanks and regards,

unni

|||

http://gotreportviewer.com has some examples of using subreports. Have you looked at those?

-Albert

|||

hi albert,

i tried the url and i used the code meant for subreport processing but the event doesnt get fired.

the dataset for subreport can only be set if the event gets fired. i will attach the code to make it more clear

Dim params(3) As ReportParameter


params(0) = New ReportParameter("ClientName", CStr(Session("ClientID")))
params(1) = New ReportParameter("Service", CStr(Session("ServicePeriodID")))
params(2) = New ReportParameter("FullName", CStr(Session("FullName")))
params(3) = New ReportParameter("ServiceName", CStr(Session("Period")))

Me.rvBusinessInc.ProcessingMode = ProcessingMode.Local
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t1", DSBIReport))
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t2", DSAgency))
AddHandler rvBusinessInc.LocalReport.SubreportProcessing, AddressOf LocalReport_SubreportProcessing

rvBusinessInc.LocalReport.SetParameters(params)
rvBusinessInc.LocalReport.Refresh()

I'm still gettin the error as subreport cannot be found.
thanks and regards,
unni

|||

Run your website in the debugger and enable catching all exceptions. Are any exceptions being throwh?

-Albert

|||

Hi,

I ran into same problem and found the follwoing two reasons for subreport error:

1. Make sure that all the parameters of the subreport have been assigned a value during design

2. Also, if you are referencing/using any external DLLs or classes from .Net Framerwork (see references tab in report properties dialog) then make sure that you confugure report viewer control for that.

Good Luck!

Naqsh

|||Hi,
I am having a lot of trouble with the report viewer as well. No matter what I try I get Error: Subreport cannot be displayed.
This is the latest code that i am using:

Imports Microsoft.Reporting.WebForms

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'Wire up the event that will allow us to bind the sub report
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ReportViewer_SubreportProcessing
ReportViewer1.LocalReport.Refresh()

End Sub

Private Sub ReportViewer_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim params(1) As ReportParameter
params(0) = New ReportParameter("questionid", CStr(e.Parameters("questionid").ToString))
ReportViewer1.LocalReport.SetParameters(params)
ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", ObjectDataSource2))
End Sub

End Class

|||

Hi,

First, You should not be using subreportprocessing event to set the main report parameters.

Does your report has one subreport or more than one? Look at the example code which comes with VS 2005.

Naqsh

|||I am just building some test reports to get an idea of how it all works but my project report has 3 subreports.|||

Nope I can't see anyway to set the subreport parameters from id values passed from the Main report. Can you post an example of how this is done. There are no examples of how to do this anywhere. They all gloss over this unless it means you don't have to in which case my report has some other problem.

Thanks very much.

|||Don't know if you are still struggling with this one, but passing parameters to subreports is simply a case of right click on the subreport where you have included it in the main report, open the Properties and Parameters Tab and specify the link between the main and subreport. As long as you have set up the correct filter in the subreport design itself, you should just be able to pick from the drop downs and choose the corresponding column to assign it to from the main dataset.....

Error: Subreport could not be shown

I am a new one in using ReportViewer in VS 2005. I try to use Main and Sub report to show data from my dataset. It doesn't matter if I use main report only, but the problem is when I use subreport intergrated with the main report. When I run it in browser, it shows:

Error: Subreport could not be shown

The main report is ok.Is there any solution to the problem?

Thank for your help!!!!

Hello,

Are you able to view the subreport if you navigate to it directly? If so, you probably havean issue with the subreport reference in the parent report.|||

hi mike,

How can we set sub report references in the parent report of reportviewer?

If you have a ready code or steps pls post since its urgent.

thanks and regards,

unni

|||

http://gotreportviewer.com has some examples of using subreports. Have you looked at those?

-Albert

|||

hi albert,

i tried the url and i used the code meant for subreport processing but the event doesnt get fired.

the dataset for subreport can only be set if the event gets fired. i will attach the code to make it more clear

Dim params(3) As ReportParameter
params(0) = New ReportParameter("ClientName", CStr(Session("ClientID")))
params(1) = New ReportParameter("Service", CStr(Session("ServicePeriodID")))
params(2) = New ReportParameter("FullName", CStr(Session("FullName")))
params(3) = New ReportParameter("ServiceName", CStr(Session("Period")))

Me.rvBusinessInc.ProcessingMode = ProcessingMode.Local
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t1", DSBIReport))
rvBusinessInc.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("t2", DSAgency))
AddHandler rvBusinessInc.LocalReport.SubreportProcessing, AddressOf LocalReport_SubreportProcessing

rvBusinessInc.LocalReport.SetParameters(params)
rvBusinessInc.LocalReport.Refresh()

I'm still gettin the error as subreport cannot be found.
thanks and regards,
unni

|||

Run your website in the debugger and enable catching all exceptions. Are any exceptions being throwh?

-Albert

|||

Hi,

I ran into same problem and found the follwoing two reasons for subreport error:

1. Make sure that all the parameters of the subreport have been assigned a value during design

2. Also, if you are referencing/using any external DLLs or classes from .Net Framerwork (see references tab in report properties dialog) then make sure that you confugure report viewer control for that.

Good Luck!

Naqsh

|||Hi,
I am having a lot of trouble with the report viewer as well. No matter what I try I get Error: Subreport cannot be displayed.
This is the latest code that i am using:

Imports Microsoft.Reporting.WebForms

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'Wire up the event that will allow us to bind the sub report
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ReportViewer_SubreportProcessing
ReportViewer1.LocalReport.Refresh()

End Sub

Private Sub ReportViewer_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
Dim params(1) As ReportParameter
params(0) = New ReportParameter("questionid", CStr(e.Parameters("questionid").ToString))
ReportViewer1.LocalReport.SetParameters(params)
ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", ObjectDataSource2))
End Sub

End Class

|||

Hi,

First, You should not be using subreportprocessing event to set the main report parameters.

Does your report has one subreport or more than one? Look at the example code which comes with VS 2005.

Naqsh

|||I am just building some test reports to get an idea of how it all works but my project report has 3 subreports.|||

Nope I can't see anyway to set the subreport parameters from id values passed from the Main report. Can you post an example of how this is done. There are no examples of how to do this anywhere. They all gloss over this unless it means you don't have to in which case my report has some other problem.

Thanks very much.

|||Don't know if you are still struggling with this one, but passing parameters to subreports is simply a case of right click on the subreport where you have included it in the main report, open the Properties and Parameters Tab and specify the link between the main and subreport. As long as you have set up the correct filter in the subreport design itself, you should just be able to pick from the drop downs and choose the corresponding column to assign it to from the main dataset.....

Wednesday, February 15, 2012

Error: Subreport could not be shown

I've got a report with subreport, passing an id field from the main to the
sub, working fine in report designer, but when I upload and view the report
on the reportserver, I get "Error: Subreport could not be shown" on each
line where I would expect to see subreport data.
How stoopid am I being? I can't find any mentions of this error message on
MSDN, Books Online, general google search etc.
Anyone with any ideas?
--
Regards
Paul Paintinhowdy - did you get this problem sorted out? I am having exactly the same problem and cannot for the life of me find any documentation on the net to fix it!!!!
Please reply if you found out what the hell to do
cheers
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.