Wednesday, February 15, 2012

Error: Subreport could not be shown

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.
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

No comments:

Post a Comment