Showing posts with label values. Show all posts
Showing posts with label values. Show all posts

Sunday, March 25, 2012

Custome code not working in Report manager

Hi all,
I have Written the Custom code to compare two different dates and
show a message Box depending on their values .It was Working Fine in
preview tab.But it is not working when i deploy to web.Only rhe message
box part is not working in Web
I do have the Custom code like this
Public Function Errorbox(ByVal s as Date,ByVal s1 as Date) As String
If s>s1 Then
System.Windows.Forms.MessageBox.Show("From Date is greater than
To Date,Please Click Ok" )
End if
Return "a"
End Function
and i gave a text box (Just a text box)
To call this custome code and i gave the expression
=Code.Errorbox(Parameters!FROM_DATE.Value,Parameters!TO_DATE.Value)
i added this Assembly also
"System.Windows.Forms"
Its not working in Report manager(web) .Can any body help me out to
knowwhat would be the Problem.i am very new to this VB Coding
Thank you
Raj Deep.AYou need to add the assembly to the following folders:
C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin
Hope this helps.
"RajDeep" wrote:
> Hi all,
> I have Written the Custom code to compare two different dates and
> show a message Box depending on their values .It was Working Fine in
> preview tab.But it is not working when i deploy to web.Only rhe message
> box part is not working in Web
> I do have the Custom code like this
> Public Function Errorbox(ByVal s as Date,ByVal s1 as Date) As String
> If s>s1 Then
> System.Windows.Forms.MessageBox.Show("From Date is greater than
> To Date,Please Click Ok" )
> End if
> Return "a"
> End Function
> and i gave a text box (Just a text box)
> To call this custome code and i gave the expression
> =Code.Errorbox(Parameters!FROM_DATE.Value,Parameters!TO_DATE.Value)
> i added this Assembly also
> "System.Windows.Forms"
> Its not working in Report manager(web) .Can any body help me out to
> knowwhat would be the Problem.i am very new to this VB Coding
> Thank you
> Raj Deep.A
>

Tuesday, March 20, 2012

custom sorting dimension values

Hi,

This one seems like a weird problem to me.

Lets say I have a dimension which has only 5 values: High,Low,Medium,VeryHigh,VeryLow.

When i browse this dimension, I want it to be custom sorted so that I always get them in the below order: VeryLow, Low,Medium,High,VeryHigh

Is there any way to accomplish this? I can arrange them in this order in the VS 2005 browser ide, but can i persist my custom arrangement?

Thanks

If you're using AS 2005, you could create an attribute to order the 5 members by. If the dimension source table is in SQL Server, you could add a named calculation for the attribute, like:

case dimvalue

when 'VeryLow' then 1

when 'Low' then 2

when 'Medium' then 3

when 'High' then 4

when 'VeryHigh' then 5 end as dimorder

http://msdn2.microsoft.com/en-us/library/ms166763.aspx

>>

SQL Server 2005 Books Online

Sorting Attribute Members Based on a Secondary Attribute

However, sometimes you may have to order attribute members based on a secondary attribute to achieve the desired sort order, for example if neither the name of the attribute nor the key of the attribute provide the sort order that you want. In order to sort an attribute by a secondary attribute name or key, you must use a secondary attribute that is related to the attribute.

>>

Sunday, March 11, 2012

Custom 'Order By' Function?

Hi I have a column varchar(4). Users enter values in one of 5 formats -
1) 1,2,3,4...10,11
2) 01,02,03,04...10,11
3) A1,A2,A3,B1,B2,B3...B10,B11
4) 1.1,2.1,3.1.....10.1,11.1
5) 1.1, 1.1A, 1.1B, 2.1, 2.1A, 2.1B....10.1,10.1A
The queruies that select from this table will only select records with
one of the formats at any one time. Is it possible to ensure the order
is always logically correct based on numerical and alphabetical
ordering, as above?
So far its seems ok except formats 4 & 5 where I get the folowoing
output-
1.3 1.3A 1.3P 11.3 16.3 2.3 2.3P 2.3S
Thanks
hals_leftHi
your query will work fine if ur 4 and 5 looks similar to 2.
the results in 4 & 5 are considered and sorted as per the char value.
prefix 0 ans see the results.
--
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---
"hals_left" wrote:

> Hi I have a column varchar(4). Users enter values in one of 5 formats -
>
> 1) 1,2,3,4...10,11
> 2) 01,02,03,04...10,11
> 3) A1,A2,A3,B1,B2,B3...B10,B11
> 4) 1.1,2.1,3.1.....10.1,11.1
> 5) 1.1, 1.1A, 1.1B, 2.1, 2.1A, 2.1B....10.1,10.1A
> The queruies that select from this table will only select records with
> one of the formats at any one time. Is it possible to ensure the order
> is always logically correct based on numerical and alphabetical
> ordering, as above?
> So far its seems ok except formats 4 & 5 where I get the folowoing
> output-
> 1.3 1.3A 1.3P 11.3 16.3 2.3 2.3P 2.3S
> Thanks
> hals_left
>|||On 28 Jul 2005 08:00:54 -0700, hals_left wrote:

>Hi I have a column varchar(4). Users enter values in one of 5 formats -
>
>1) 1,2,3,4...10,11
>2) 01,02,03,04...10,11
>3) A1,A2,A3,B1,B2,B3...B10,B11
>4) 1.1,2.1,3.1.....10.1,11.1
>5) 1.1, 1.1A, 1.1B, 2.1, 2.1A, 2.1B....10.1,10.1A
Hi hals_left,
How does one store 10.1A in a varchar(4) column?

> is thgere now way to write a different
>ordering function?
Try the following. It's not pretty, but it might work:
ORDER BY
CASE
WHEN my_column LIKE '[A-Z]%'
THEN LEFT (my_column, 1)
END,
CASE
WHEN my_column LIKE '[A-Z]%'
THEN CAST (SUBSTRING (my_column, 2, 3) AS int)
WHEN my_column LIKE '%.%'
THEN CAST (LEFT (my_column, CHARINDEX ('.', my_column) - 1) AS int)
ELSE CAST (my_column AS int)
END,
CASE
WHEN my_column LIKE '%.%'
THEN SUBSTRING (my_column, CHARINDEX ('.', my_column) + 1, 4)
END
(untested)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Thursday, March 8, 2012

Custom Formatting

I need to Format some items in a different way.
for example I have values that are .962 and want
the report to format this to 0.962 but
if say the value is .65 I want it to format it as 0.65
how would I do this?Patrick,
Try Format(Convert.ToDouble("<your field>"), "0.00")
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Patrick K" <PatrickK@.discussions.microsoft.com> wrote in message
news:FD864917-BC4A-4DFB-912F-B893AD8B6AC5@.microsoft.com...
> I need to Format some items in a different way.
> for example I have values that are .962 and want
> the report to format this to 0.962 but
> if say the value is .65 I want it to format it as 0.65
> how would I do this?|||"Teo Lachev [MVP]" wrote:
> Patrick,
> Try Format(Convert.ToDouble("<your field>"), "0.00")
> --
> Hope this helps.
> ---
> Teo Lachev, MVP [SQL Server], MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ---
> "Patrick K" <PatrickK@.discussions.microsoft.com> wrote in message
> news:FD864917-BC4A-4DFB-912F-B893AD8B6AC5@.microsoft.com...
> > I need to Format some items in a different way.
> > for example I have values that are .962 and want
> > the report to format this to 0.962 but
> > if say the value is .65 I want it to format it as 0.65
> >
> > how would I do this?
>
> That is good but what if the values are mixed, some are .962 and others are .65|||Then use a custom function which will determine the length of the string and
figure out the format specifier.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Patrick K" <PatrickK@.discussions.microsoft.com> wrote in message
news:74808F24-4605-4DAD-8F55-00D80D677B8F@.microsoft.com...
>
> "Teo Lachev [MVP]" wrote:
> > Patrick,
> >
> > Try Format(Convert.ToDouble("<your field>"), "0.00")
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MVP [SQL Server], MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ---
> >
> > "Patrick K" <PatrickK@.discussions.microsoft.com> wrote in message
> > news:FD864917-BC4A-4DFB-912F-B893AD8B6AC5@.microsoft.com...
> > > I need to Format some items in a different way.
> > > for example I have values that are .962 and want
> > > the report to format this to 0.962 but
> > > if say the value is .65 I want it to format it as 0.65
> > >
> > > how would I do this?
> >
> >
> > That is good but what if the values are mixed, some are .962 and others
are .65

Custom Formatt Required

Hi,
I need custom format string for displaying percentage values.
If negative values are there it should be displayed within
paranthesis(brackets), it should display two decimal values also.
Example:
Present Value Format
--
-0.21%
Required Value Format
--
(0.21)%
Plzz help me with any suggestion/url, it's very urgent.
Thanks and Regards,
Rajesh Yennam.
HA,India.#0.0%;(#0.0%)
HTH
"Rajesh Yennam" <RajeshYennam@.discussions.microsoft.com> wrote in message
news:3FFB1760-D5F1-4092-A4F5-1F339F6CC6B6@.microsoft.com...
> Hi,
> I need custom format string for displaying percentage values.
> If negative values are there it should be displayed within
> paranthesis(brackets), it should display two decimal values also.
> Example:
> Present Value Format
> --
> -0.21%
> Required Value Format
> --
> (0.21)%
> Plzz help me with any suggestion/url, it's very urgent.
> Thanks and Regards,
> Rajesh Yennam.
> HA,India.|||Take a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp
You can use semi-colons in your format string semicolon to specify positive,
negative, and zero formats, e.g.
%;(%);%
--
Brian Welcker
Group Program Manager
Microsoft SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rajesh Yennam" <RajeshYennam@.discussions.microsoft.com> wrote in message
news:3FFB1760-D5F1-4092-A4F5-1F339F6CC6B6@.microsoft.com...
> Hi,
> I need custom format string for displaying percentage values.
> If negative values are there it should be displayed within
> paranthesis(brackets), it should display two decimal values also.
> Example:
> Present Value Format
> --
> -0.21%
> Required Value Format
> --
> (0.21)%
> Plzz help me with any suggestion/url, it's very urgent.
> Thanks and Regards,
> Rajesh Yennam.
> HA,India.|||Thanks a lot for your response Tim.
It's working fine.
Thanks and Regards,
Rajesh Yennam
HA,India.
"Tim Ellison" wrote:
> #0.0%;(#0.0%)
> HTH
> "Rajesh Yennam" <RajeshYennam@.discussions.microsoft.com> wrote in message
> news:3FFB1760-D5F1-4092-A4F5-1F339F6CC6B6@.microsoft.com...
> > Hi,
> > I need custom format string for displaying percentage values.
> > If negative values are there it should be displayed within
> > paranthesis(brackets), it should display two decimal values also.
> >
> > Example:
> > Present Value Format
> > --
> > -0.21%
> >
> > Required Value Format
> > --
> > (0.21)%
> >
> > Plzz help me with any suggestion/url, it's very urgent.
> >
> > Thanks and Regards,
> > Rajesh Yennam.
> > HA,India.
>
>

Saturday, February 25, 2012

Custom configuration settings?

We are an ISV and our OLAP solution will be deployed to many customers. Needless to say, various values needs to be customized to meet the client needs, e.g. KPI goal values. What will the recommended way to implement custom configuration settings in the cube that are accessable to MDX calculations?An example would be helpful. I have vague understanding of what you are asking, perhaps more explanation will make it more clear.

Friday, February 24, 2012

Custom Code and Report Parameters

Can custom code reference the values of report parameters?Are you going to access from custom code/appl or you are going to use it
from the custom code of the report properties option ? Why I am asking you is
that in 1st case you will get the parameters since you will be passing for
"rendering" the report. In the 2nd case try using =Report.Parameters!Param1
Amarnath.
"QM06" wrote:
> Can custom code reference the values of report parameters?

Friday, February 17, 2012

Custom assembly call in footer looses property values.

Custom assembly call in footer looses property values.
I have a custom assembly that uses a method in the body to pass in a data
field. When I fetch the data in the body I get my data back. When I do the
same in the footer I don't get any data. I have an active call in with
Microsoft so will also post there. I thought
we had working code, I was declaring the module scoped variable as static,
but that ends up with other peoples data on occassion when several people
are running reports. MS Support told me don't use static variables, but if
I don't then I can't access my properties in the footer.
I built a sample report and custom assembly to try to figure this out.
In the report I have something like this:
Body:
=Code.DataInFooter_NonStatic.ExpSet_MyData(First(Fields!LoginID.Value))
=Code.DataInFooter_NonStatic.MyData()
Footer:
=Code.DataInFooter_NonStatic.MyData()
What is displayed:
Body:
expected value
Footer:
empty and this is the problem.
Is it an execution order issue?
Here's my sample code:
using System;
using System.Collections.Generic;
using System.Text;
namespace DataInFooter_NonStatic
{
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert,
Unrestricted = true)]
public class DataInFooter_NonStatic
{
private string _MyData;
public string MyData
{
get
{
return _MyData;
}
set
{
_MyData = MyData;
}
}
public void WriteToFile(string Input)
{
//throw new System.NotImplementedException();
}
public string ExpSet_MyData(string Input)
{
_MyData = Input;
return _MyData;
}
}
}
Steve MunLeeuwDo this instead in your footer:
for the field that is displaying originally the
"=code.DataInFooter_NonStatic.MyData()" have it point to the
ReportItems!<name of control in body>.Value i.e. ReportItems!TextBox17.Value
(where textbox 17 in the body contains your call to
"=Code.DataInFooter_NonStatic.MyData()"
=-Chris
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:Opk5KuF9GHA.5092@.TK2MSFTNGP04.phx.gbl...
> Custom assembly call in footer looses property values.
> I have a custom assembly that uses a method in the body to pass in a data
> field. When I fetch the data in the body I get my data back. When I do
> the
> same in the footer I don't get any data. I have an active call in with
> Microsoft so will also post there. I thought
> we had working code, I was declaring the module scoped variable as static,
> but that ends up with other peoples data on occassion when several people
> are running reports. MS Support told me don't use static variables, but
> if I don't then I can't access my properties in the footer.
> I built a sample report and custom assembly to try to figure this out.
> In the report I have something like this:
> Body:
> =Code.DataInFooter_NonStatic.ExpSet_MyData(First(Fields!LoginID.Value))
> =Code.DataInFooter_NonStatic.MyData()
> Footer:
> =Code.DataInFooter_NonStatic.MyData()
> What is displayed:
> Body:
> expected value
> Footer:
> empty and this is the problem.
> Is it an execution order issue?
> Here's my sample code:
> using System;
> using System.Collections.Generic;
> using System.Text;
> namespace DataInFooter_NonStatic
> {
> [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert,
> Unrestricted = true)]
> public class DataInFooter_NonStatic
> {
> private string _MyData;
> public string MyData
> {
> get
> {
> return _MyData;
> }
> set
> {
> _MyData = MyData;
> }
> }
> public void WriteToFile(string Input)
> {
> //throw new System.NotImplementedException();
> }
> public string ExpSet_MyData(string Input)
> {
> _MyData = Input;
> return _MyData;
> }
> }
> }
> Steve MunLeeuw
>|||Ok, thanks I will try that.
I think this causes and exception when you try to access the ReportItems
collection in a footer when the page doesn't have any data fields. For
example if you have a page in the middle of the report that has static text
in a textbox that spans a full page then there are no data rows in the page
and accessing the ReportItems causes the report to fail. Either that or the
ReportItem!MyHiddenFooterData.Value would not show up for that page in
PDF...or something like that. I'll try and experiment around.
Steve MunLeeuw
"Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
news:u7HPquG9GHA.1492@.TK2MSFTNGP02.phx.gbl...
> Do this instead in your footer:
> for the field that is displaying originally the
> "=code.DataInFooter_NonStatic.MyData()" have it point to the
> ReportItems!<name of control in body>.Value i.e.
> ReportItems!TextBox17.Value (where textbox 17 in the body contains your
> call to "=Code.DataInFooter_NonStatic.MyData()"
> =-Chris
> "Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
> news:Opk5KuF9GHA.5092@.TK2MSFTNGP04.phx.gbl...
>> Custom assembly call in footer looses property values.
>> I have a custom assembly that uses a method in the body to pass in a data
>> field. When I fetch the data in the body I get my data back. When I do
>> the
>> same in the footer I don't get any data. I have an active call in with
>> Microsoft so will also post there. I thought
>> we had working code, I was declaring the module scoped variable as
>> static,
>> but that ends up with other peoples data on occassion when several people
>> are running reports. MS Support told me don't use static variables, but
>> if I don't then I can't access my properties in the footer.
>> I built a sample report and custom assembly to try to figure this out.
>> In the report I have something like this:
>> Body:
>> =Code.DataInFooter_NonStatic.ExpSet_MyData(First(Fields!LoginID.Value))
>> =Code.DataInFooter_NonStatic.MyData()
>> Footer:
>> =Code.DataInFooter_NonStatic.MyData()
>> What is displayed:
>> Body:
>> expected value
>> Footer:
>> empty and this is the problem.
>> Is it an execution order issue?
>> Here's my sample code:
>> using System;
>> using System.Collections.Generic;
>> using System.Text;
>> namespace DataInFooter_NonStatic
>> {
>> [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert,
>> Unrestricted = true)]
>> public class DataInFooter_NonStatic
>> {
>> private string _MyData;
>> public string MyData
>> {
>> get
>> {
>> return _MyData;
>> }
>> set
>> {
>> _MyData = MyData;
>> }
>> }
>> public void WriteToFile(string Input)
>> {
>> //throw new System.NotImplementedException();
>> }
>> public string ExpSet_MyData(string Input)
>> {
>> _MyData = Input;
>> return _MyData;
>> }
>> }
>> }
>> Steve MunLeeuw
>|||Turns out the custom assembly gets loaded once in the body, then again in
the footer, that's why they don't share data so well.
Steve MunLeeuw
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:Opk5KuF9GHA.5092@.TK2MSFTNGP04.phx.gbl...
> Custom assembly call in footer looses property values.
> I have a custom assembly that uses a method in the body to pass in a data
> field. When I fetch the data in the body I get my data back. When I do
> the
> same in the footer I don't get any data. I have an active call in with
> Microsoft so will also post there. I thought
> we had working code, I was declaring the module scoped variable as static,
> but that ends up with other peoples data on occassion when several people
> are running reports. MS Support told me don't use static variables, but
> if I don't then I can't access my properties in the footer.
> I built a sample report and custom assembly to try to figure this out.
> In the report I have something like this:
> Body:
> =Code.DataInFooter_NonStatic.ExpSet_MyData(First(Fields!LoginID.Value))
> =Code.DataInFooter_NonStatic.MyData()
> Footer:
> =Code.DataInFooter_NonStatic.MyData()
> What is displayed:
> Body:
> expected value
> Footer:
> empty and this is the problem.
> Is it an execution order issue?
> Here's my sample code:
> using System;
> using System.Collections.Generic;
> using System.Text;
> namespace DataInFooter_NonStatic
> {
> [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert,
> Unrestricted = true)]
> public class DataInFooter_NonStatic
> {
> private string _MyData;
> public string MyData
> {
> get
> {
> return _MyData;
> }
> set
> {
> _MyData = MyData;
> }
> }
> public void WriteToFile(string Input)
> {
> //throw new System.NotImplementedException();
> }
> public string ExpSet_MyData(string Input)
> {
> _MyData = Input;
> return _MyData;
> }
> }
> }
> Steve MunLeeuw
>|||Here's some sample code of a custom assembly that shows the instance is not
shared between the body of the report and the footer.
http://smunson.blogspot.com/2006/10/rs-custom-assembly-instance-gets-re.html
Steve MunLeeuw
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:Opk5KuF9GHA.5092@.TK2MSFTNGP04.phx.gbl...
> Custom assembly call in footer looses property values.
> I have a custom assembly that uses a method in the body to pass in a data
> field. When I fetch the data in the body I get my data back. When I do
> the
> same in the footer I don't get any data. I have an active call in with
> Microsoft so will also post there. I thought
> we had working code, I was declaring the module scoped variable as static,
> but that ends up with other peoples data on occassion when several people
> are running reports. MS Support told me don't use static variables, but
> if I don't then I can't access my properties in the footer.
> I built a sample report and custom assembly to try to figure this out.
> In the report I have something like this:
> Body:
> =Code.DataInFooter_NonStatic.ExpSet_MyData(First(Fields!LoginID.Value))
> =Code.DataInFooter_NonStatic.MyData()
> Footer:
> =Code.DataInFooter_NonStatic.MyData()
> What is displayed:
> Body:
> expected value
> Footer:
> empty and this is the problem.
> Is it an execution order issue?
> Here's my sample code:
> using System;
> using System.Collections.Generic;
> using System.Text;
> namespace DataInFooter_NonStatic
> {
> [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert,
> Unrestricted = true)]
> public class DataInFooter_NonStatic
> {
> private string _MyData;
> public string MyData
> {
> get
> {
> return _MyData;
> }
> set
> {
> _MyData = MyData;
> }
> }
> public void WriteToFile(string Input)
> {
> //throw new System.NotImplementedException();
> }
> public string ExpSet_MyData(string Input)
> {
> _MyData = Input;
> return _MyData;
> }
> }
> }
> Steve MunLeeuw
>

Tuesday, February 14, 2012

Custom Aggrigate Functions

I was trying to calculate the Meadian of the group of values (grouped based on some columns). I could not find any standard aggrigate funtion for doing so.

It would be great if I can be able to create my own custom aggrigate functions and use the same in the RunningValues funtion.

It would be even interesting if the user can share code written across reports and report projects, with out the need to copy and paste the same custom function in all the reports.

Rich and very interesting feature would be enabling the developer to use the traditional VS2005 UI to develop his code instead of the mundane text box.

Take a look at the following blog article:
http://blogs.msdn.com/bwelcker/archive/2005/05/10/416306.aspx

Another example (a moving average aggregate implementation for a chart - can be applied similarly for a table or matrix) is shown in one of the samples of the following whitepaper - search for the section about "Moving Average Calculations": http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/MoreSSRSCharts.asp

-- Robert

|||

Robert, Thanks for the reply. I have done some thing similar to the one in the first link.

I am facing a problem with this kind of logic. I get the #Error in the first group footer, in second group footer I get the value, but it is the median value of the first group. It continues like this and last footer has the median value of the previous group footer (missing its own value).

To confrim how the values string is built I did reset the visibility of the hidden column and saw the values building correctly. It accumalates each value row by row and last row in the group (before the footer) has all the values to calculate median. And this holds good for the First Group also.

Am I doing some thing wrong?

The code is below:

Public AucBaseAmtString As String

'Append all the amounts to a string seperated by comma. ex: ,12,322,23,232

'Call this funtion in the hidden column of the table for each row

Public Function AccumulateAucBase(Amt As String) As String
AucBaseAmtString = AucBaseAmtString & "," & Amt
Return AucBaseAmtString
End Function

'Call the Median function in the Group Footer.

Public Function Median() As String
Dim Count As Integer
Dim AucBaseAmts() As String

'Truncate the first comma
If AucBaseAmtString <> "" Then
AucBaseAmtString = Mid(AucBaseAmtString, 2)
End If

'Get the amounts to array
AucBaseAmts = AucBaseAmtString.Split(",")

'Reset the string for the next group
AucBaseAmtString = ""

'Calculate median and return
Count = AucBaseAmts.GetLength(0)
If Count = 0 Then Return "0"
Array.Sort(AucBaseAmts)
If Count Mod 2 = 0 Then
Return CStr((CInt(AucBaseAmts((Count / 2) - 1)) + CInt(AucBaseAmts(Count / 2))) / 2)
Else
Return CStr(AucBaseAmts(Count / 2))
End If
End Function