Wednesday, March 21, 2012
Referring to subreport fields from main (container) report....
Is it possible, from within the context of a main report that contains
several subreports, to write code in the main report that refers to field
values within one or more of the contained subreports? (I would like to
display totals in the main report that are sums of quantities displayed in
several subreports.)
TIA,
mattyseltz in Queens, NYOn May 7, 1:24 pm, mattyseltz <mattyse...@.discussions.microsoft.com>
wrote:
> All--
> Is it possible, from within the context of a main report that contains
> several subreports, to write code in the main report that refers to field
> values within one or more of the contained subreports? (I would like to
> display totals in the main report that are sums of quantities displayed in
> several subreports.)
> TIA,
> mattyseltz in Queens, NY
The closest you can get to that is to include the same datasets in the
main report that exist in the subreports and use an expression similar
to the following:
=Sum(Fields!Quantity.Value, "SameDataSetAsUsedInSubReport")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi, Enrique,
Thanks for your reply. I see that you answered a similar question on
April 18, sorry to make you repeat yourself.
Best,
Matt
"EMartinez" wrote:
> On May 7, 1:24 pm, mattyseltz <mattyse...@.discussions.microsoft.com>
> wrote:
> > All--
> > Is it possible, from within the context of a main report that contains
> > several subreports, to write code in the main report that refers to field
> > values within one or more of the contained subreports? (I would like to
> > display totals in the main report that are sums of quantities displayed in
> > several subreports.)
> >
> > TIA,
> >
> > mattyseltz in Queens, NY
>
> The closest you can get to that is to include the same datasets in the
> main report that exist in the subreports and use an expression similar
> to the following:
> =Sum(Fields!Quantity.Value, "SameDataSetAsUsedInSubReport")
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||On May 8, 8:16 am, mattyseltz <mattyse...@.discussions.microsoft.com>
wrote:
> Hi, Enrique,
> Thanks for your reply. I see that you answered a similar question on
> April 18, sorry to make you repeat yourself.
> Best,
> Matt
> "EMartinez" wrote:
> > On May 7, 1:24 pm, mattyseltz <mattyse...@.discussions.microsoft.com>
> > wrote:
> > > All--
> > > Is it possible, from within the context of a main report that contains
> > > several subreports, to write code in the main report that refers to field
> > > values within one or more of the contained subreports? (I would like to
> > > display totals in the main report that are sums of quantities displayed in
> > > several subreports.)
> > > TIA,
> > > mattyseltz in Queens, NY
> > The closest you can get to that is to include the same datasets in the
> > main report that exist in the subreports and use an expression similar
> > to the following:
> > =Sum(Fields!Quantity.Value, "SameDataSetAsUsedInSubReport")
> > Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
You're welcome. No problem. Glad I could be of assistance.
Regards,
Enrique Martinez
Sr. Software Consultant
referencing value in subreport in calculated field on parent
elsewhere...
this subreport has one txtbox, no grid or any other objects.
is this possible?
what is the syntax...'
i.e. =mysubReport.mytxtbox.value...........
thanksOn Sep 28, 2:51 pm, r...@.mgk.com wrote:
> I wish to reference the value in a subreport in a calculated field
> elsewhere...
> this subreport has one txtbox, no grid or any other objects.
> is this possible?
> what is the syntax...'
> i.e. =mysubReport.mytxtbox.value...........
> thanks
You will need to create a dataset in the main report that accesses the
same data (i.e., query/stored procedure) that is used in the subreport
and add the calculation the same way (basically duplicating the
efforts). Then, in the main report, reference this dataset via an
aggregate expression, for example:
=Max(Fields!SomeFieldName.Value, "NewDataSetName")
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Sep 29, 10:27 pm, EMartinez <emartinez...@.gmail.com> wrote:
> On Sep 28, 2:51 pm, r...@.mgk.com wrote:
> > I wish to reference the value in a subreport in a calculated field
> > elsewhere...
> > this subreport has one txtbox, no grid or any other objects.
> > is this possible?
> > what is the syntax...'
> > i.e. =mysubReport.mytxtbox.value...........
> > thanks
> You will need to create a dataset in the main report that accesses the
> same data (i.e., query/stored procedure) that is used in the subreport
> and add the calculation the same way (basically duplicating the
> efforts). Then, in the main report, reference this dataset via an
> aggregate expression, for example:
> =Max(Fields!SomeFieldName.Value, "NewDataSetName")
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
argh! i was afraid of that...sql
Tuesday, March 20, 2012
Referencing the return value of a Subreport
I have a subreport inside my main report and it is working just fine. The subreport is called sbrCaseSummary.
In an expression of another txtbox in the main report I want to reference the value returned from the subreport. How do you reference it? I can't find out how that's done. Help.
I am having the exact same problem. Anybody have any ideas?
BJ
referencing subreport value
What is the syntax to reference a subreports returning value?
I need to subtotal values returning from a subreport, but I don't know how to reference it.
Thanks,
Hi,
From your description, it seems that you want to reference a subreport in the parent report, right?
Based on my knowledge, you cannot reference a subreport from the parentreport. I suggest that you should have a DataSet in the parent report which achieves the summing work from the datasource or just create a subreport with the subtotals you need.
Thanks.
|||
I found out a way to this with a subreport. Nevermind.
Neither of your suggestions will work because the data in my subreport is referencing a child table.
I cannot use a subreport to do the summing because I need to attach these values when a group changes.
Any other ideas?
Referencing ReportItems in Subreport from Main Report
I want to reference a textbox value from the sub report into the main
report.
Thanks
GeorgeOn Dec 6, 6:18 pm, "_george" <none@.nojne@.none> wrote:
> Is this at all possible in SQL 2000 reporting services?
> I want to reference a textbox value from the sub report into the main
> report.
> Thanks
> George
The best way to accommodate this is to create the same dataset that is
used in the subreport's textbox control (where applicable) in the main
report. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant