Friday, February 17, 2012
Error: Subreport could not be shown. : A report with only one subreport
I created a simple report that just one item in it, a subreport. If I
run the report in my .Net Visual Studio, the report displays ok with the
subreport. When I deploy the report to the report server, the report
displays "Error: Subreport could not be shown. " message.
The main report has no parameters and the subreport's parameters are set
using the Subreport Properties dialog.
Is this a bug? What is the work around?
SteveThe main report has no datasets it is pretty much almost an empty report
except for the subreport.
The subreport has at least 4 additional subreports inside itself.
It seems if the subreport doesn't contain internal subreports inside then I
don't get the error.
"steve kwon" <steven,kwon@.lmco.com> wrote in message
news:Owxae%23CrFHA.2624@.TK2MSFTNGP15.phx.gbl...
> Hello,
> I created a simple report with just one item in it, a subreport. If I
> run the report in my .Net Visual Studio, the report displays ok with the
> subreport. When I deploy the report to the report server, the report
> displays "Error: Subreport could not be shown. " message.
> The main report has no parameters and the subreport's parameters are
> set using the Subreport Properties dialog.
> Is this a bug? What is the work around?
> Steve
>
Error: Subreport could not be shown.
I have a problem with a report containing a number of subreports not running successfully when deployed to the Report Server.
The report runs successfully every time in the VS Development environment, so parameters are all setup correctly and the result is as expected accross the whole report.
No errors or warnings are listed when building or deploying.
All subreports are in the same project as the main report and deployed to the same folder in Report Manager. All the individual subreports run successfully both in VS Studio (Preview Tab) and in the Report Manager portal.
About 50% of the time, the main report runs but shows the error "Subreport could not be shown" for some or all of the subreports.
Running SQL 2005 SP1
Please advise.
Are any of the reports/subreports set to execute on a schedule or are cached?
and do they all have credentials stored?
|||Thanks for the reply.
Hi,
Can you be experiencing a parameter passing problem? Dates are always a little bit problemetic.
For one of my reports which I use date parameters and the date picker control of the SSRS 2005, the case is just the opposite. It fails on the VS2005 IDE, but runs successfully on the deployed Report Server.
Eralper
http://www.kodyaz.com
|||
Hi,
I don't think this is the issue, because all the subreports are driven by the same 3 parameters from the parent report, 2 of which are using the date picker control and it always works fine in VS. All of the subreports when run individually using the same parameters work fine.
Also, when it returns an error, which is only around half the time, generally the first 1 or 2 of 6 subreports is rendered correctly with the rest showing the error. I have reconciled the data results which are filtered by the parameters (Start & End dates) and the parameters are being correctly applied.
FYI, each subreport takes around 5 minutes to run individually, with the parent report averaging around 15-25 mins.
As a test, I deleted all the reports from the portal, rebuilt the solution and redeployed and everything was working as expected for several runs of the report including a snapshot via a linked report. Unfortunately, the problem has now re-occurred for no apparent reason.
I am begging to suspect resource related / timeout issues or some deloyment related issues but don't really understand why the report would be reliable in VS and not in the portal.
Any help appreciated.
PS: Re your experience, if you haven't already done so, refresh the datasets in VS then try previewing the report.
Error: Subreport could not be shown.
I am using SQL Server 2000/Vis Studio 2003 to make a report with three subreports.
The main report has one shared datasource to a sql server 2000 database. The subreports all use one, different shared datasource to a different sql server 2000 database. They two databases can link together by employee id.
It all works fine in Vis Studio, but when I deploy I get the error:
Error: Subreport could not be shown.
I have made sure that the subreports are not wider than space allows on the main report. If the problem is that of using different datasources, then how else can I accomplish this? (I already tried linked server but ran into bugs).
Thanks
Have you checked the server log to see if there are more detailed error messages for the failed subreports?
http://msdn2.microsoft.com/en-us/library/ms156500.aspx
Error: Subreport could not be shown.
Hi,
I have been battling with this for days now and I cannot get this to work. I would really appreciate it if someone could advise me of where I am going wrong:
Default.aspx.vb:
Imports Microsoft.Reporting.WebForms
Partial Class _Default
Inherits System.Web.UI.Page
Dim odsItems As New ObjectDataSource
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ItemsSubreportProcessingEventHandler
ReportViewer1.LocalReport.Refresh()
End Sub
Private Sub ItemsSubreportProcessingEventHandler(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
If odsItems Is Nothing Then
odsItems = LoadItemsData()
If (e.Parameters.Count > 0) Then
If (odsItems.SelectParameters.Count > 0) Then
odsItems.SelectParameters.RemoveAt(0)
odsItems.SelectParameters.Add(New Parameter("questionid", TypeCode.Int32, CInt(e.Parameters(0).Values(0).ToString)))
End If
End If
e.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", odsItems))
End If
End Sub
Private Function LoadItemsData()
Dim ods As New ObjectDataSource
ods.TypeName = "DataSet2TableAdapters.templBPQuesTableAdapter"
ods.SelectMethod = "GetSubQuestions"
Return ods
End Function
End Class
Default.aspx:
<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
Height="400px" Width="400px">
<LocalReport ReportPath="c:\inetpub\wwwroot\srstest\Report.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1_templBPQues" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetQuestions"
TypeName="DataSet1TableAdapters.templBPQuesTableAdapter"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetSubQuestions"
TypeName="DataSet2TableAdapters.templBPQuesTableAdapter" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:Parameter Name="questionid" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
My report is one main report with no Parameters and a subreport which is passed one parameter from the main report "questionid".
No matter what I do I get the same error: Error: Subreport could not be shown. I have tried setting the param to string, integer, hidden whatever and nothing works.
Any help would be awesome. Thanks.
Hello,
Has anyone got any clues? I have the exact same problem!
Error: Subreport could not be shown.
Hi,
I have been battling with this for days now and I cannot get this to work. I would really appreciate it if someone could advise me of where I am going wrong:
Default.aspx.vb:
Imports Microsoft.Reporting.WebForms
Partial Class _Default
Inherits System.Web.UI.Page
Dim odsItems As New ObjectDataSource
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
AddHandler ReportViewer1.LocalReport.SubreportProcessing, AddressOf ItemsSubreportProcessingEventHandler
ReportViewer1.LocalReport.Refresh()
End Sub
Private Sub ItemsSubreportProcessingEventHandler(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs)
If odsItems Is Nothing Then
odsItems = LoadItemsData()
If (e.Parameters.Count > 0) Then
If (odsItems.SelectParameters.Count > 0) Then
odsItems.SelectParameters.RemoveAt(0)
odsItems.SelectParameters.Add(New Parameter("questionid", TypeCode.Int32, CInt(e.Parameters(0).Values(0).ToString)))
End If
End If
e.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("DataSet2_templBPQues", odsItems))
End If
End Sub
Private Function LoadItemsData()
Dim ods As New ObjectDataSource
ods.TypeName = "DataSet2TableAdapters.templBPQuesTableAdapter"
ods.SelectMethod = "GetSubQuestions"
Return ods
End Function
End Class
Default.aspx:
<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
Height="400px" Width="400px">
<LocalReport ReportPath="c:\inetpub\wwwroot\srstest\Report.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1_templBPQues" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetQuestions"
TypeName="DataSet1TableAdapters.templBPQuesTableAdapter"></asp:ObjectDataSource>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetSubQuestions"
TypeName="DataSet2TableAdapters.templBPQuesTableAdapter" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:Parameter Name="questionid" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
My report is one main report with no Parameters and a subreport which is passed one parameter from the main report "questionid".
No matter what I do I get the same error: Error: Subreport could not be shown. I have tried setting the param to string, integer, hidden whatever and nothing works.
Any help would be awesome. Thanks.
Hello,
Has anyone got any clues? I have the exact same problem!
Error: Subreport could not be shown.
a single query, since on the design window I can see only one page, my
initial solution was to create 4 reports, and they work fine, but the
end user needs to see the 4 forms at once to send it to a pdf.
Now, I created a new report and add the 4 reports as a subreports, but
I am getting the message "Error: Subreport could not be shown. "
I will apreciate any help.
Thank you
GustavoHi,
Just check the right report you have selected from the drop down for sub
reportand most importantly all the parameters are selected propely. I doubt
it should be some missing parameters.
Amarnath.
"gvt99@.hotmail.com" wrote:
> I have to print 4 forms one form per page from a datatable generated by
> a single query, since on the design window I can see only one page, my
> initial solution was to create 4 reports, and they work fine, but the
> end user needs to see the 4 forms at once to send it to a pdf.
> Now, I created a new report and add the 4 reports as a subreports, but
> I am getting the message "Error: Subreport could not be shown. "
> I will apreciate any help.
> Thank you
> Gustavo
>|||Gustavo,
You are probably missing some parameters. You must supply the
subreports with parameters from the Master report.
Also, Amarnath, dont forget that if the report has temp tables, it will
not automatically fill those parameters.
regards,
Stas K.
Error: Subreport could not be shown.
Report Manager or thru a subscription to be rendered as a PDF attachment?
Subreports view fine through Visual Studio .NET Report project.
Thanks in advance.whats the error u r getting?
"Microsoft PrivateNews" <Dave.Troyer@.cliftoncpa.com> wrote in message news:<uRRh35dwEHA.1524@.TK2MSFTNGP09.phx.gbl>...
> Does anyone have an idea what would cause this error when viewing this in
> Report Manager or thru a subscription to be rendered as a PDF attachment?
> Subreports view fine through Visual Studio .NET Report project.
> Thanks in advance.|||I figured out the problem. In report manager, the error displayed was
'Error: Subreport could not be shown.' What happen was when I uploaded the
reports thru report manager and then change the name of the reports in
report manager. The subreport could not be found that was specified
originally.
Thanks for replying.
"Amit Bhandari" <abhandari2004@.gmail.com> wrote in message
news:c3d1e67b.0411041027.63b0acf4@.posting.google.com...
> whats the error u r getting?
>
> "Microsoft PrivateNews" <Dave.Troyer@.cliftoncpa.com> wrote in message
> news:<uRRh35dwEHA.1524@.TK2MSFTNGP09.phx.gbl>...
>> Does anyone have an idea what would cause this error when viewing this in
>> Report Manager or thru a subscription to be rendered as a PDF attachment?
>> Subreports view fine through Visual Studio .NET Report project.
>> Thanks in advance.
Error: Subreport could not be shown.
getting the above noted error. The problem seems to have to do with passing
the parameter, because:
- The subreport runs fine standalone from the designer if I make the
parameter unhidden and execute it by manually entering the parameter value.
- The subreport runs fine within the parent report if I substitute the
parameter reference in the sub's dataset with a hard-coded value, and do not
attempt to pass a parameter from the parent
- Essentially, any time I try to pass a parameter - no matter what the
value - it fails. For instance, the subreport fails when I try to pass the
parameter, even if I set the subreport dataset to "SELECT 1" and put a static
text value in both the parent's parameter value and the subreport's textbox.
This seems like it should be so simple to do! Please help!
TIA,
Joel
PS - I created/wired the subreport as follows:
- New report
- Single, string parameter
- Table data region
- Dataset referencing the parameter, and referenced by the table
- Textbox within the table, referencing the single column returned in the
dataset
- Within table data region in parent report, subreport object:
- referencing the subreport by choosing from dropdown list
- parameter referencing the subreport report object and a field from the
parent data set, both values selected from the dropdown lists providedI seem to have resolved this. I *think* that the problem was that I had made
the parameter 'internal/hidden,' but I was unable to detect it because VS was
failing to deploy the report. When I deleted the report from the server and
then then re-deployed, the problem went away.
Joel
"JoelB" wrote:
> New to SSRS, I'm trying to add a very simple subreport to my report, but am
> getting the above noted error. The problem seems to have to do with passing
> the parameter, because:
> - The subreport runs fine standalone from the designer if I make the
> parameter unhidden and execute it by manually entering the parameter value.
> - The subreport runs fine within the parent report if I substitute the
> parameter reference in the sub's dataset with a hard-coded value, and do not
> attempt to pass a parameter from the parent
> - Essentially, any time I try to pass a parameter - no matter what the
> value - it fails. For instance, the subreport fails when I try to pass the
> parameter, even if I set the subreport dataset to "SELECT 1" and put a static
> text value in both the parent's parameter value and the subreport's textbox.
> This seems like it should be so simple to do! Please help!
> TIA,
> Joel
> PS - I created/wired the subreport as follows:
> - New report
> - Single, string parameter
> - Table data region
> - Dataset referencing the parameter, and referenced by the table
> - Textbox within the table, referencing the single column returned in the
> dataset
> - Within table data region in parent report, subreport object:
> - referencing the subreport by choosing from dropdown list
> - parameter referencing the subreport report object and a field from the
> parent data set, both values selected from the dropdown lists provided
>|||On Jan 7, 1:14 pm, JoelB <Jo...@.discussions.microsoft.com> wrote:
> I seem to have resolved this. I *think* that the problem was that I had made
> the parameter 'internal/hidden,' but I was unable to detect it because VS was
> failing to deploy the report. When I deleted the report from the server and
> then then re-deployed, the problem went away.
> Joel
> "JoelB" wrote:
> > New to SSRS, I'm trying to add a very simple subreport to my report, but am
> > getting the above noted error. The problem seems to have to do with passing
> > the parameter, because:
> > - The subreport runs fine standalone from the designer if I make the
> > parameter unhidden and execute it by manually entering the parameter value.
> > - The subreport runs fine within the parent report if I substitute the
> > parameter reference in the sub's dataset with a hard-coded value, and do not
> > attempt to pass a parameter from the parent
> > - Essentially, any time I try to pass a parameter - no matter what the
> > value - it fails. For instance, the subreport fails when I try to pass the
> > parameter, even if I set the subreport dataset to "SELECT 1" and put a static
> > text value in both the parent's parameter value and the subreport's textbox.
> > This seems like it should be so simple to do! Please help!
> > TIA,
> > Joel
> > PS - I created/wired the subreport as follows:
> > - New report
> > - Single, string parameter
> > - Table data region
> > - Dataset referencing the parameter, and referenced by the table
> > - Textbox within the table, referencing the single column returned in the
> > dataset
> > - Within table data region in parent report, subreport object:
> > - referencing the subreport by choosing from dropdown list
> > - parameter referencing the subreport report object and a field from the
> > parent data set, both values selected from the dropdown lists provided
You might have not set the dataset of the subreport once you deployed
it to the Report Manager via th Properties tab. Also, this error
occurs sometimes when no data is returned from the subreport to the
main report. Hope this helps going forward.
Regards,
Enrique Martinez
Sr. Software Consultant|||Enrique,
Thanks for your response. I was a little careless in saying that it wasn't
deploying. What we have experienced with this report and other reports on
occasion is that sometimes the reports don't deploy completely...like some
settings don't get updated. Of late we have started to notice a trend that
the problems usually have to do with parameters and related properties. When
we delete the report from the server and then deploy, the problems go away.
We have not seen any instances where we have had to alter the datasource in
the report properties on the server.
Thanks again,
Joel
"EMartinez" wrote:
> On Jan 7, 1:14 pm, JoelB <Jo...@.discussions.microsoft.com> wrote:
> > I seem to have resolved this. I *think* that the problem was that I had made
> > the parameter 'internal/hidden,' but I was unable to detect it because VS was
> > failing to deploy the report. When I deleted the report from the server and
> > then then re-deployed, the problem went away.
> >
> > Joel
> >
> > "JoelB" wrote:
> > > New to SSRS, I'm trying to add a very simple subreport to my report, but am
> > > getting the above noted error. The problem seems to have to do with passing
> > > the parameter, because:
> >
> > > - The subreport runs fine standalone from the designer if I make the
> > > parameter unhidden and execute it by manually entering the parameter value.
> > > - The subreport runs fine within the parent report if I substitute the
> > > parameter reference in the sub's dataset with a hard-coded value, and do not
> > > attempt to pass a parameter from the parent
> > > - Essentially, any time I try to pass a parameter - no matter what the
> > > value - it fails. For instance, the subreport fails when I try to pass the
> > > parameter, even if I set the subreport dataset to "SELECT 1" and put a static
> > > text value in both the parent's parameter value and the subreport's textbox.
> >
> > > This seems like it should be so simple to do! Please help!
> >
> > > TIA,
> > > Joel
> >
> > > PS - I created/wired the subreport as follows:
> >
> > > - New report
> > > - Single, string parameter
> > > - Table data region
> > > - Dataset referencing the parameter, and referenced by the table
> > > - Textbox within the table, referencing the single column returned in the
> > > dataset
> > > - Within table data region in parent report, subreport object:
> > > - referencing the subreport by choosing from dropdown list
> > > - parameter referencing the subreport report object and a field from the
> > > parent data set, both values selected from the dropdown lists provided
>
> You might have not set the dataset of the subreport once you deployed
> it to the Report Manager via th Properties tab. Also, this error
> occurs sometimes when no data is returned from the subreport to the
> main report. Hope this helps going forward.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>
Error: Subreport could not be shown 2
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
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()
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
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()
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
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()
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
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()
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
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()
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've researched for a day and have perused every similar post but to no avail.
I'm building a very simple master-detail report using the report builder in VS 2005. I am not using a forms project.
All
parameters seem to be set up correctly because when data exists in my
subreport, it displays perfectly. The problem is that when I pass a
parameter to the subreport and the subreport returns 0 records, I
receive the infamous "Error: Subreport could not be shown" message in
my textbox.
I've tried setting the NoRows property but it seems
that it's overridden. I've tried setting various sections of the
subreport (from within the subreport) to Visible = False based on a
condition but again, it seems that the error is generated before this.
Could I be overlooking something? Any ideas?
Other notes:
-
I'm not Deploying these reports to the Report Server yet, the error is
strictly within the IDE, but upon performing a test, I receieve the
same error even after deployment.
- Using VS 2005 w / no Service Packs
Thanks!Solved it!
On the sub-report itself, I had to specify that my parameter should be "Non-queried" instead of "From query".
This stopped my subreport from generating the "Error: Subreport could not be shown" message.
Wednesday, February 15, 2012
Error: Subreport could not be shown
report containing a sub-report. 1 simple parameter a GUID string is passed
from the parent report to the subreport and all I seem to get in return is
the message 'Error: Subreport could not be shown' with no indication as to
what the problem is or might be. If i view the subreport on its own and
manually enter the parameter the sub report displays fine and as expected
but when the parameter is passed via the parent form it won't play ball.
Thanks in advance for any help - u will be doing me a big favour if you can
help me overcome this.
SimonProbably a type-problem. Are you sure you "send" a string and that the
receiving parameter is also a string?
"Simon Dingley" wrote:
> I have an infuriating problem which I can't seem to overcome with my first
> report containing a sub-report. 1 simple parameter a GUID string is passed
> from the parent report to the subreport and all I seem to get in return is
> the message 'Error: Subreport could not be shown' with no indication as to
> what the problem is or might be. If i view the subreport on its own and
> manually enter the parameter the sub report displays fine and as expected
> but when the parameter is passed via the parent form it won't play ball.
> Thanks in advance for any help - u will be doing me a big favour if you can
> help me overcome this.
> Simon
>
>|||Hi and thanks for the reply,
The parameter passed is a 'field' e.g. =Fields!qst_id.Value which is
actually a GUID from the database. As far as I can see there is no way for
me to specify in the sub-report properties what data type the parameter is.
However, in the sub report itself the parameter data type is defined as
being a string ?
Does this shed any light on things ?
Thanks, Simon
"Antoon" <Antoon@.discussions.microsoft.com> wrote in message
news:4CD7BC66-C0E9-4E79-957E-0C8040C1EA4C@.microsoft.com...
> Probably a type-problem. Are you sure you "send" a string and that the
> receiving parameter is also a string?
> "Simon Dingley" wrote:
> > I have an infuriating problem which I can't seem to overcome with my
first
> > report containing a sub-report. 1 simple parameter a GUID string is
passed
> > from the parent report to the subreport and all I seem to get in return
is
> > the message 'Error: Subreport could not be shown' with no indication as
to
> > what the problem is or might be. If i view the subreport on its own and
> > manually enter the parameter the sub report displays fine and as
expected
> > but when the parameter is passed via the parent form it won't play ball.
> >
> > Thanks in advance for any help - u will be doing me a big favour if you
can
> > help me overcome this.
> >
> > Simon
> >
> >
> >|||Try passing Fields!qst_id.Value.ToString() to the subreport
(I do presume the subreport is within a matrix, tabele, list,... and not "on
its own". In the last case you should use an agregate function fe
first(Fields!qst_id.Value).ToString() )
"Simon Dingley" wrote:
> Hi and thanks for the reply,
> The parameter passed is a 'field' e.g. =Fields!qst_id.Value which is
> actually a GUID from the database. As far as I can see there is no way for
> me to specify in the sub-report properties what data type the parameter is.
> However, in the sub report itself the parameter data type is defined as
> being a string ?
> Does this shed any light on things ?
> Thanks, Simon
> "Antoon" <Antoon@.discussions.microsoft.com> wrote in message
> news:4CD7BC66-C0E9-4E79-957E-0C8040C1EA4C@.microsoft.com...
> > Probably a type-problem. Are you sure you "send" a string and that the
> > receiving parameter is also a string?
> >
> > "Simon Dingley" wrote:
> >
> > > I have an infuriating problem which I can't seem to overcome with my
> first
> > > report containing a sub-report. 1 simple parameter a GUID string is
> passed
> > > from the parent report to the subreport and all I seem to get in return
> is
> > > the message 'Error: Subreport could not be shown' with no indication as
> to
> > > what the problem is or might be. If i view the subreport on its own and
> > > manually enter the parameter the sub report displays fine and as
> expected
> > > but when the parameter is passed via the parent form it won't play ball.
> > >
> > > Thanks in advance for any help - u will be doing me a big favour if you
> can
> > > help me overcome this.
> > >
> > > Simon
> > >
> > >
> > >
>
>|||Antoon - you're a star. That worked a treat.
Many thanks for your help.
Simon
"Antoon" <Antoon@.discussions.microsoft.com> wrote in message
news:283D9BE2-1B26-4066-A3AE-A477868DEB96@.microsoft.com...
> Try passing Fields!qst_id.Value.ToString() to the subreport
> (I do presume the subreport is within a matrix, tabele, list,... and not
"on
> its own". In the last case you should use an agregate function fe
> first(Fields!qst_id.Value).ToString() )
>|||One more quick question if I can. This works great for me when developing
and previewing in Visual Studio .Net but when I deploy the report to the
reporting server I get the subreport could be shown error again ? Do you
know why this is ?
Simon
"Antoon" <Antoon@.discussions.microsoft.com> wrote in message
news:283D9BE2-1B26-4066-A3AE-A477868DEB96@.microsoft.com...
> Try passing Fields!qst_id.Value.ToString() to the subreport
> (I do presume the subreport is within a matrix, tabele, list,... and not
"on
> its own". In the last case you should use an agregate function fe
> first(Fields!qst_id.Value).ToString() )|||Not too worry - after viewing the subreport as a standalone report i
discovered there was a problem connecting through the shared datasource.
Thanks again.
Simon
>One more quick question if I can. This works great for me when developing
>and previewing in Visual Studio .Net but when I deploy the report to the
>reporting server I get the subreport could be shown error again ? Do you
>know why this is ?
>Simon
Error: Subreport could not be shown
I've been searching everywhere to try and find the solution to my problem.
I have a main report with a subreport. The first row renders the sub report
just fine but for the rest of the rows it gives the error: Error: Subreport
could not be shown.
The parameters I'm passing are valid, and I am also casting them to the data
type the sub report is expecting. Is this some sort of SSRS bug? There
doesn't seem to be a valid solution to this problem. Any help would be much
appreciated.
Thanks,
dev88Yeah, we had the same problem here. In our case, it looks like it has to do
with basing the the Main report and Sub-report on the same Report Model. I
don't know all the details, but when it tries to add the second instance of
the same sup-report, it finds it already has an index entry (where? I'm not
sure) with that id, and can't / won't show it again. Hence, the "Subreport
could not be shown".
Our workaround : rebuild the Sub-Reports without using the Report model; go
directly to the database, and use SQL to bring back the data with same field
names. Oh, and the field names are case-sensitive, so watch out.
I hear there may be fix for this in SP2, when it arrives. (However, I also
heard Elvis playing in the room next door, so my hearing may be bad! :) )
Also, your problem may be something different. But, this worked for us.
Mark
"dev88" <dev88@.discussions.microsoft.com> wrote in message
news:D1FD303C-D618-4F37-B850-CEB7B84E0D81@.microsoft.com...
> Hi,
> I've been searching everywhere to try and find the solution to my problem.
> I have a main report with a subreport. The first row renders the sub
> report
> just fine but for the rest of the rows it gives the error: Error:
> Subreport
> could not be shown.
> The parameters I'm passing are valid, and I am also casting them to the
> data
> type the sub report is expecting. Is this some sort of SSRS bug? There
> doesn't seem to be a valid solution to this problem. Any help would be
> much
> appreciated.
> Thanks,
> dev88|||Thanks for the advice Mark. This is quite a strange problem. My parent
report and my subreport both connect to a shared datasource which is an
analysis services database, therefore I didn't need to use a Report Model.
I did however try to change the datasource of my parent report to get the
data directly from a sql database (so the parent report and sub report
weren't sharing a connection) and now half the subreports are displayed
properly while the other half still display the same error "Error: Subreport
could not be shown". I'm half way there, anyone have any other suggestions?
Thanks.
"theMark" wrote:
> Yeah, we had the same problem here. In our case, it looks like it has to do
> with basing the the Main report and Sub-report on the same Report Model. I
> don't know all the details, but when it tries to add the second instance of
> the same sup-report, it finds it already has an index entry (where? I'm not
> sure) with that id, and can't / won't show it again. Hence, the "Subreport
> could not be shown".
> Our workaround : rebuild the Sub-Reports without using the Report model; go
> directly to the database, and use SQL to bring back the data with same field
> names. Oh, and the field names are case-sensitive, so watch out.
> I hear there may be fix for this in SP2, when it arrives. (However, I also
> heard Elvis playing in the room next door, so my hearing may be bad! :) )
> Also, your problem may be something different. But, this worked for us.
> Mark
>
> "dev88" <dev88@.discussions.microsoft.com> wrote in message
> news:D1FD303C-D618-4F37-B850-CEB7B84E0D81@.microsoft.com...
> > Hi,
> >
> > I've been searching everywhere to try and find the solution to my problem.
> > I have a main report with a subreport. The first row renders the sub
> > report
> > just fine but for the rest of the rows it gives the error: Error:
> > Subreport
> > could not be shown.
> >
> > The parameters I'm passing are valid, and I am also casting them to the
> > data
> > type the sub report is expecting. Is this some sort of SSRS bug? There
> > doesn't seem to be a valid solution to this problem. Any help would be
> > much
> > appreciated.
> >
> > Thanks,
> > dev88
>
>|||"dev88" wrote:
> Thanks for the advice Mark. This is quite a strange problem. My parent
> report and my subreport both connect to a shared datasource which is an
> analysis services database, therefore I didn't need to use a Report Model.
> I did however try to change the datasource of my parent report to get the
> data directly from a sql database (so the parent report and sub report
> weren't sharing a connection) and now half the subreports are displayed
> properly while the other half still display the same error "Error: Subreport
> could not be shown". I'm half way there, anyone have any other suggestions?
> Thanks.
> "theMark" wrote:
> > Yeah, we had the same problem here. In our case, it looks like it has to do
> > with basing the the Main report and Sub-report on the same Report Model. I
> > don't know all the details, but when it tries to add the second instance of
> > the same sup-report, it finds it already has an index entry (where? I'm not
> > sure) with that id, and can't / won't show it again. Hence, the "Subreport
> > could not be shown".
> >
> > Our workaround : rebuild the Sub-Reports without using the Report model; go
> > directly to the database, and use SQL to bring back the data with same field
> > names. Oh, and the field names are case-sensitive, so watch out.
> >
> > I hear there may be fix for this in SP2, when it arrives. (However, I also
> > heard Elvis playing in the room next door, so my hearing may be bad! :) )
> > Also, your problem may be something different. But, this worked for us.
> >
> > Mark
> >
> >
> > "dev88" <dev88@.discussions.microsoft.com> wrote in message
> > news:D1FD303C-D618-4F37-B850-CEB7B84E0D81@.microsoft.com...
> > > Hi,
> > >
> > > I've been searching everywhere to try and find the solution to my problem.
> > > I have a main report with a subreport. The first row renders the sub
> > > report
> > > just fine but for the rest of the rows it gives the error: Error:
> > > Subreport
> > > could not be shown.
> > >
> > > The parameters I'm passing are valid, and I am also casting them to the
> > > data
> > > type the sub report is expecting. Is this some sort of SSRS bug? There
> > > doesn't seem to be a valid solution to this problem. Any help would be
> > > much
> > > appreciated.
> > >
> > > Thanks,
> > > dev88
> >
> >
> >|||I have a similar symptom. I have a main report with several subreports. The
truly odd thing is that this report has run correctly for many months.
Recently we have had this symptom showing up after about 5 or 6 pages. I
cannot see an errors showing up when I use the profiler. We are getting our
enterprise IT group to install some other diagnostic tools to see if there is
something else going on. I am beginning to suspect some system problem at a
lower level than Reporting services. I would very much like to hear from
anyone else who has this problem.
Stuart
"dev88" wrote:
> Thanks for the advice Mark. This is quite a strange problem. My parent
> report and my subreport both connect to a shared datasource which is an
> analysis services database, therefore I didn't need to use a Report Model.
> I did however try to change the datasource of my parent report to get the
> data directly from a sql database (so the parent report and sub report
> weren't sharing a connection) and now half the subreports are displayed
> properly while the other half still display the same error "Error: Subreport
> could not be shown". I'm half way there, anyone have any other suggestions?
> Thanks.
> "theMark" wrote:
> > Yeah, we had the same problem here. In our case, it looks like it has to do
> > with basing the the Main report and Sub-report on the same Report Model. I
> > don't know all the details, but when it tries to add the second instance of
> > the same sup-report, it finds it already has an index entry (where? I'm not
> > sure) with that id, and can't / won't show it again. Hence, the "Subreport
> > could not be shown".
> >
> > Our workaround : rebuild the Sub-Reports without using the Report model; go
> > directly to the database, and use SQL to bring back the data with same field
> > names. Oh, and the field names are case-sensitive, so watch out.
> >
> > I hear there may be fix for this in SP2, when it arrives. (However, I also
> > heard Elvis playing in the room next door, so my hearing may be bad! :) )
> > Also, your problem may be something different. But, this worked for us.
> >
> > Mark
> >
> >
> > "dev88" <dev88@.discussions.microsoft.com> wrote in message
> > news:D1FD303C-D618-4F37-B850-CEB7B84E0D81@.microsoft.com...
> > > Hi,
> > >
> > > I've been searching everywhere to try and find the solution to my problem.
> > > I have a main report with a subreport. The first row renders the sub
> > > report
> > > just fine but for the rest of the rows it gives the error: Error:
> > > Subreport
> > > could not be shown.
> > >
> > > The parameters I'm passing are valid, and I am also casting them to the
> > > data
> > > type the sub report is expecting. Is this some sort of SSRS bug? There
> > > doesn't seem to be a valid solution to this problem. Any help would be
> > > much
> > > appreciated.
> > >
> > > Thanks,
> > > dev88
> >
> >
> >
Error: Subreport could not be shown
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.
Error: Subreport could not be shown
from my PC. When I run it on the server it works fine. Any idea.
ThanksOn Jun 13, 11:14 am, Shan <S...@.discussions.microsoft.com> wrote:
> I am getting this error when I run this report only when I access this report
> from my PC. When I run it on the server it works fine. Any idea.
> Thanks
Is the subreport located in the correct location on your PC? Also,
sometimes this error occurs when there is an error in the subreport.
Is there maybe some missing data/stored procedure/etc on your local
machine that does exist on the other machine/server? Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks for the tip. But all of a sudden it's working now. I dint' do any
thing. I dont know why wouldn't it run I never had this issue before. Thanks
"EMartinez" wrote:
> On Jun 13, 11:14 am, Shan <S...@.discussions.microsoft.com> wrote:
> > I am getting this error when I run this report only when I access this report
> > from my PC. When I run it on the server it works fine. Any idea.
> > Thanks
> Is the subreport located in the correct location on your PC? Also,
> sometimes this error occurs when there is an error in the subreport.
> Is there maybe some missing data/stored procedure/etc on your local
> machine that does exist on the other machine/server? Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||On Jun 13, 1:32 pm, Shan <S...@.discussions.microsoft.com> wrote:
> Thanks for the tip. But all of a sudden it's working now. I dint' do any
> thing. I dont know why wouldn't it run I never had this issue before. Thanks
> "EMartinez" wrote:
> > On Jun 13, 11:14 am, Shan <S...@.discussions.microsoft.com> wrote:
> > > I am getting this error when I run this report only when I access this report
> > > from my PC. When I run it on the server it works fine. Any idea.
> > > Thanks
> > Is the subreport located in the correct location on your PC? Also,
> > sometimes this error occurs when there is an error in the subreport.
> > Is there maybe some missing data/stored procedure/etc on your local
> > machine that does exist on the other machine/server? Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
I'm glad it works now. In this case, I would suggest checking the
query/stored procedure that is sourcing the subreport to make sure
that it does not have performance problems (probably via the Database
Engine Tuning Advisor). Also, check the report using a full range of
parameter values (where applicable) to verify that you did not omit
the error by parameter selection. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant
Error: Subreport could not be shown
has a subreport in the group footer to pull up dependent objects (the only
way I could get more than the first dependent object to list). The report
has parameters where you can choose to look at All Tables or individual
tables in the DB. It passes this param (@.tblName) to the subreport.
When I preview individual tables, the subreport works great! When I preview
"All Tables", the subreport works on some tables, and then has that error
listed after other tables. Even tables that it works on fine individually
can have this error message.
The data set for the subreport is called TableDepends and uses the following
code:
---
Declare @.objid int
If @.tblName <> 'All Tables'
Begin
Set @.objid = Object_ID(@.tblName)
if exists (select *
from sysdepends
where depid = @.objid)
begin
select distinct 'name' = (s.name + '.' + o.name), @.tblName as TableName,
type = substring(v.name, 5, 16)
from sysobjects o, master.dbo.spt_values v, sysdepends d,
sysusers s
where o.id = d.id
and o.xtype = substring(v.name,1,2) collate database_default
and v.type = 'O9T'
and d.depid = @.objid
and o.uid = s.uid
and deptype < 2
End
End
---
It's weird that this code works in some parts of the main report when I make
@.tblName = 'All Tables' in the main report, but then doesn't parse on other
parts of the main report. And I can't figure out how to do an ELSE clause
that still lists all table dependencies due to the whole Object_ID issue.
Any suggestions?
Thanks,Did a little more looking around. It appears that this error renders in the
Preview tab of Report Designer at Page 6 (and above) of 52 pages. The first
5 pages render correctly. So, I guess my question is whether or not the
Designer can handle all those re-renderings of the subreport.
On the first 5 pages, it doesn't matter if there's 1 dependency or many
dependencies, they all seem to render fine.
Thoughts?
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> I have a data dictionary report. It lists table & column definitions, then
> has a subreport in the group footer to pull up dependent objects (the only
> way I could get more than the first dependent object to list). The report
> has parameters where you can choose to look at All Tables or individual
> tables in the DB. It passes this param (@.tblName) to the subreport.
> When I preview individual tables, the subreport works great! When I preview
> "All Tables", the subreport works on some tables, and then has that error
> listed after other tables. Even tables that it works on fine individually
> can have this error message.
> The data set for the subreport is called TableDepends and uses the following
> code:
> ---
> Declare @.objid int
>
> If @.tblName <> 'All Tables'
> Begin
> Set @.objid = Object_ID(@.tblName)
> if exists (select *
> from sysdepends
> where depid = @.objid)
> begin
> select distinct 'name' = (s.name + '.' + o.name), @.tblName as TableName,
> type = substring(v.name, 5, 16)
> from sysobjects o, master.dbo.spt_values v, sysdepends d,
> sysusers s
> where o.id = d.id
> and o.xtype = substring(v.name,1,2) collate database_default
> and v.type = 'O9T'
> and d.depid = @.objid
> and o.uid = s.uid
> and deptype < 2
> End
> End
> ---
> It's weird that this code works in some parts of the main report when I make
> @.tblName = 'All Tables' in the main report, but then doesn't parse on other
> parts of the main report. And I can't figure out how to do an ELSE clause
> that still lists all table dependencies due to the whole Object_ID issue.
> Any suggestions?
> Thanks,
>|||Further information:
Finally found the ReportServer Error Logs. Here are the error messages I'm
getting:
----
aspnet_wp!processing!12f4!5/12/2005-10:30:34:: w WARN: Data source
'APACS_BASE': Report processing has been aborted.
aspnet_wp!processing!12f4!5/12/2005-10:30:34:: e ERROR: Throwing
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing., ;
Info:
Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An
error has occurred during report processing. -->
System.InvalidOperationException: Invalid attempt to read when no data is
present.
at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at
Microsoft.ReportingServices.DataExtensions.DataReaderWrapper.GetOrdinal(String fieldName)
at
Microsoft.ReportingServices.DataExtensions.MappingDataReader..ctor(String
dataSetName, IDataReader sourceReader, String[] aliases, String[] fieldNames)
at Microsoft.ReportingServices.ReportProcessing.h..ctor(String A_0,
IDataReader A_1, String[] A_2, String[] A_3)
at Microsoft.ReportingServices.ReportProcessing.a1.v()
at Microsoft.ReportingServices.ReportProcessing.ax.c()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Boolean& A_0)
at Microsoft.ReportingServices.ReportProcessing.ax.b()
at Microsoft.ReportingServices.ReportProcessing.a1.a(Object A_0)
-- End of inner exception stack trace --
----
This error comes up in the log for every time the subreport tries to print
and can't. Anyone have any ideas how to get around it?
Thanks!
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> I have a data dictionary report. It lists table & column definitions, then
> has a subreport in the group footer to pull up dependent objects (the only
> way I could get more than the first dependent object to list). The report
> has parameters where you can choose to look at All Tables or individual
> tables in the DB. It passes this param (@.tblName) to the subreport.
> When I preview individual tables, the subreport works great! When I preview
> "All Tables", the subreport works on some tables, and then has that error
> listed after other tables. Even tables that it works on fine individually
> can have this error message.
> The data set for the subreport is called TableDepends and uses the following
> code:
> ---
> Declare @.objid int
>
> If @.tblName <> 'All Tables'
> Begin
> Set @.objid = Object_ID(@.tblName)
> if exists (select *
> from sysdepends
> where depid = @.objid)
> begin
> select distinct 'name' = (s.name + '.' + o.name), @.tblName as TableName,
> type = substring(v.name, 5, 16)
> from sysobjects o, master.dbo.spt_values v, sysdepends d,
> sysusers s
> where o.id = d.id
> and o.xtype = substring(v.name,1,2) collate database_default
> and v.type = 'O9T'
> and d.depid = @.objid
> and o.uid = s.uid
> and deptype < 2
> End
> End
> ---
> It's weird that this code works in some parts of the main report when I make
> @.tblName = 'All Tables' in the main report, but then doesn't parse on other
> parts of the main report. And I can't figure out how to do an ELSE clause
> that still lists all table dependencies due to the whole Object_ID issue.
> Any suggestions?
> Thanks,
>