Showing posts with label footer. Show all posts
Showing posts with label footer. Show all posts

Friday, March 30, 2012

Regarding Custom Code using table or list control(data set)

I have the report like this

list1

{

list2

{

table1

table header

table fields

table footer

}

}

now i want to calculate the sum of one field in table when it contains particular value using CUSTOM CODE ONLY

and i want to display it in table footer. please send me answer to this id as soon as possible.

Thanks

Sateesh Maduri

Maybe I'm missing something, but couldn't you just use a conditional aggregation expression like the following in the table footer:

=Sum(iif(Fields!A.Value = "abc", CInt(Fields!B.Value), 0))

-- Robert

|||

Hello Robert

Actually I already know that what u have given using sum().But I need Custom Code for that ,I mean if I have a dataset which fills the data in the table control How should I write Custom Code to calculate sum of one field when it contains particular value.

Thanks

sql

Monday, March 12, 2012

Reference previously calculated values in a table between rows

I have a requirement where I produce a number of rows in a table footer and each subsequent rows needs values calculated in the previous row. Fields in columns can be given a name and used in another column of the same row by using "=ReportItems!textbox1.Value".
Is the same thing available between rows?
Thanks for any help.You can refer to the previous value of fields (expressions) in table rows.
Try e.g.:
=Previews(Fields!abc.Value)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"lsff" <lsff@.discussions.microsoft.com> wrote in message
news:C73A4807-BCE9-4B58-A2FC-4E894C07A30D@.microsoft.com...
> I have a requirement where I produce a number of rows in a table footer
and each subsequent rows needs values calculated in the previous row. Fields
in columns can be given a name and used in another column of the same row by
using "=ReportItems!textbox1.Value".
> Is the same thing available between rows?
> Thanks for any help.|||Sorry, I meant:
=Previous(Fields!abc.Value)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:uA75dBFdEHA.3148@.TK2MSFTNGP10.phx.gbl...
> You can refer to the previous value of fields (expressions) in table rows.
> Try e.g.:
> =Previews(Fields!abc.Value)
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "lsff" <lsff@.discussions.microsoft.com> wrote in message
> news:C73A4807-BCE9-4B58-A2FC-4E894C07A30D@.microsoft.com...
> > I have a requirement where I produce a number of rows in a table footer
> and each subsequent rows needs values calculated in the previous row.
Fields
> in columns can be given a name and used in another column of the same row
by
> using "=ReportItems!textbox1.Value".
> >
> > Is the same thing available between rows?
> >
> > Thanks for any help.
>|||Robert,
This didn't do what I needed. For example, I have a field which contains a sum of different values (call it field A). In the next row, I calculate a value based on field A and another field in a different dataset (call this field B). In the third row, I want the total of Fields A and B (call this Field C). At the moment, I include in Field C the formula for field A and add to it the formula from Field B. I have a number of other rows wioth progressive additions. So you can see the formula in the fields keep on getting bigger and bigger. It would be nice to just say Field A + Field B, etc.
"Robert Bruckner [MSFT]" wrote:
> Sorry, I meant:
> =Previous(Fields!abc.Value)
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
> news:uA75dBFdEHA.3148@.TK2MSFTNGP10.phx.gbl...
> > You can refer to the previous value of fields (expressions) in table rows.
> > Try e.g.:
> > =Previews(Fields!abc.Value)
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "lsff" <lsff@.discussions.microsoft.com> wrote in message
> > news:C73A4807-BCE9-4B58-A2FC-4E894C07A30D@.microsoft.com...
> > > I have a requirement where I produce a number of rows in a table footer
> > and each subsequent rows needs values calculated in the previous row.
> Fields
> > in columns can be given a name and used in another column of the same row
> by
> > using "=ReportItems!textbox1.Value".
> > >
> > > Is the same thing available between rows?
> > >
> > > Thanks for any help.
> >
> >
>
>

Friday, March 9, 2012

Reference a textbox in a report SSRS 2000

I am working in SSRS 2000, and I have a report using a table. In the footer of the table I want to do a calcuation. I have a textbox in the table called "SumAmtCurrent", which is a sum value for a field in my dataset. I have another field in my dataset, "TotalRevCurrent", and I would like to take this second field, subtract the value in the textbox "SumAmtCurrent", and have the result in the footer of the table. I tried to reference the textbox using ReportItems!SumAmtCurrent.Value - but that gives me the following error

"...The value expression for the textbox ‘textbox7’ refers to the report item ‘SumAmtCurrent’. Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope..."

Is there a way I can get this total into my report?

Thanks in advance!

One way would be to use a Global variable and some custom code.

Something like this... (untested)

' Put this in the code tab

Protected MyValue as Object

function setValue(value as object) as object
MyValue = value

end function

function getValue() as object
return MyValue

end function

'Set this in a hidden textbox above where you want to get the value

=Code.setValue(value)

'Get this where you want to get the value

=MyField.Value / Code.getValue()

Hopefully this gives an idea of how to do something like this. Apologies if the code doesn't work out of the box but the concept should be ok.

cheers,

Andrew

Refereing a text box

Hello all,
i have a text box in the page footer region that i want to refer to in the
report body. How do i refer it? When i enter the text box name and value it
says cant find text box.
thanks in advance
IshanI believe it is ReportItem!TextBox.Value. Or it least it works that way
when refering to a text box from the report body to a text box in the
footer.|||Name the text box that you want to reference. Ex: txtAnswer
In your footer text box enter =ReportItems!txtAnswer.value
Hope this helps!
"michaelhilding@.gmail.com" wrote:
> I believe it is ReportItem!TextBox.Value. Or it least it works that way
> when refering to a text box from the report body to a text box in the
> footer.
>

Saturday, February 25, 2012

reduce the table height when NORows in table having a footer control

hi,
i am using two header ,three grouping level and in a table and there is
a one Report Footer in report.
when there is no data present then the report hide all groups and
Detail rows but the Report Footer still remains at same position. i
want that the Footer should also aligned to top when there is no data
,The space between the Header and Footer should zero in this case.
which property i need to set to do this. or what i shld do'
thx.Rajesh,
How far down is the footer?
I see there are 2 solutions in this case:
1) In the properties of a cell there is CanGrow and CanShrink
properties.(This is under Layout). Dont forget, your going to change
this for the DETAIL and grouping rows... not the footer one.
2) Also you can set all the middle rows to become Hidden. This can be
be done using an expressions that should basically check if data is
present ( check on some other row), and then the Visibiliy --> hidden
property should be set to true for all those detail/grouping rows.
I hope this helps.
regards,
Stas K.|||hi Scoredon,
I tried ur solution but its not working ,still my probelm is not
resolved.
my report format is like
TableHeader
TableHeader
Grouping I Fund
Grouping II Issuer
Grouping III Security
<Display Of Information>
Security/Facility Wise Total
Issuer Wise Total
Fund Wise Total
Grand Total
Page Footer
when there is no data then i get the structure like
TableHeader
TableHeader
Grand Total
<space>
<space>
<space>
<space>
<space>
<space>
<space>
Page Footer
I want the structure like this
TableHeader
TableHeader
Grand Total
Page Footer
I hope now you have understood my problem completely.plz try to resolve
this.
Thx
Rajesh
Sorcerdon wrote:
> Rajesh,
> How far down is the footer?
> I see there are 2 solutions in this case:
> 1) In the properties of a cell there is CanGrow and CanShrink
> properties.(This is under Layout). Dont forget, your going to change
> this for the DETAIL and grouping rows... not the footer one.
> 2) Also you can set all the middle rows to become Hidden. This can be
> be done using an expressions that should basically check if data is
> present ( check on some other row), and then the Visibiliy --> hidden
> property should be set to true for all those detail/grouping rows.
> I hope this helps.
> regards,
> Stas K.|||Rajesh,
It looks to me like you want the Page Footer to actually be a Table
Footer. Can you create an additional Table Footer row and insert the
values you have in your Page Footer?
The only problem with this is the footer will always appear immediately
below your Grand Total row instead of at the bottom of the page.
To offset this scenario, you could set the visibility properties for
the Table Footer to hidden and the Page Footer to Visible when there is
data and vice-a-versa when there is no data.
Good luck
Rajesh.jain25@.gmail.com wrote:
> hi Scoredon,
> I tried ur solution but its not working ,still my probelm is not
> resolved.
> my report format is like
> TableHeader
> TableHeader
> Grouping I Fund
> Grouping II Issuer
> Grouping III Security
> <Display Of Information>
> Security/Facility Wise Total
> Issuer Wise Total
> Fund Wise Total
> Grand Total
> Page Footer
> when there is no data then i get the structure like
> TableHeader
> TableHeader
> Grand Total
> <space>
> <space>
> <space>
> <space>
> <space>
> <space>
> <space>
> Page Footer
> I want the structure like this
> TableHeader
> TableHeader
> Grand Total
> Page Footer
> I hope now you have understood my problem completely.plz try to resolve
> this.
> Thx
> Rajesh
> Sorcerdon wrote:
> > Rajesh,
> >
> > How far down is the footer?
> >
> > I see there are 2 solutions in this case:
> > 1) In the properties of a cell there is CanGrow and CanShrink
> > properties.(This is under Layout). Dont forget, your going to change
> > this for the DETAIL and grouping rows... not the footer one.
> > 2) Also you can set all the middle rows to become Hidden. This can be
> > be done using an expressions that should basically check if data is
> > present ( check on some other row), and then the Visibiliy --> hidden
> > property should be set to true for all those detail/grouping rows.
> >
> > I hope this helps.
> > regards,
> >
> > Stas K.