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
Wednesday, March 7, 2012
Re-Execution of For each Loop Container
I have a For each loop container and inside the same a group of text files are loading to a table using bulk insert task.If there are duplicate files i dont wish to load it into the table. Duplicate check can be done by script task but how do i skip the files and repeat the for loop for the next files.
That means i want to skip some files and load the other files in a for loop.
How do i do that.
Can anybody please help me.
So here is what you doLoop container has inside a Script task that checks for a duplicate file
and a BULK INSERT task that does what it says on the tin.
The script task and the BI task are joined by workflow.
Declare a variable say something like FileAlreadyThere of type DT_BOOL
(boolean)
In the script task if the file is already there set the value of this
variable to TRUE and if not then FALSE.
The workflow now between the two tasks should be based on an expression
as well as outcome so have a look at this article and you want to set
your expression to something like
@.FileAlreadyThere == FALSE
http://wiki.sqlis.com/default.aspx/SQLISWiki/LogicalOrExample.html
Allan
"Raj Amb@.discussions.microsoft.com" wrote in message news:1b962d72-8a6d-4b3c-bdab-e86bfda3270b@.discussions.microsoft.com: > I have a For each loop container and inside the same a group of text > files are loading to a table using bulk insert task.If there are > duplicate files i dont wish to load it into the table. Duplicate check > can be done by script task but how do i skip the files and repeat the > for loop for the next files. > > That means i want to skip some files and load the other files in a for > loop. > How do i do that. > > Can anybody please help me.|||Thank you very much for your post. I would like to know one more thing that in the same for loop if the bulk load of one file fails the whole package(For loop) fails. but i want to continue/iterate the for loop till the last file , how do i do that.||| but i want to continue/iterate the for loop till the last file , how do i do that. Raj Amb wrote:
Thank you very much for your post. I would like to know one more thing that in the same for loop if the bulk load of one file fails the whole package(For loop) fails.
This is controlled by two properties:
1) FailPackageOnFailure on each task or container - set it to false to ignore errors.
2) Also, each task and container have MaxErrorCount - increase it to desired value.