I need to sort a report in 3 ways 2 fields and one expression.
When i add a field to a parameter it says the following:
"Fields cannot be used in report parameter expressions"
The expression I need to sort on is this
=(sum(Fields!p1beløb.Value) - sum(Fields!p2beløb.Value)) /
(0.001+sum(Fields!p1beløb.Value))
It works if I use this as sort on the group item, but I need to choose
between 3 kinds.
How can I sort the report if I can't use fields to tell how I want it
sorted
?
Jack
--
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 45071 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dkCreate a function in the code area which accepts the Parameter ( 1,2 or 3 )
and all of the fields you wish to sort on..
The function should use the parameter in a case/switch statement to choose
which value to return. In one case it should return the value of the
expression you mentioned.
In the sort column pu
=Code.GetSort(Parameters!SortVal.Value,......)
Hope this helps...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
news:ebEGvm9tFHA.1472@.TK2MSFTNGP15.phx.gbl...
>I need to sort a report in 3 ways 2 fields and one expression.
> When i add a field to a parameter it says the following:
> "Fields cannot be used in report parameter expressions"
> The expression I need to sort on is this
> =(sum(Fields!p1beløb.Value) - sum(Fields!p2beløb.Value)) /
> (0.001+sum(Fields!p1beløb.Value))
> It works if I use this as sort on the group item, but I need to choose
> between 3 kinds.
> How can I sort the report if I can't use fields to tell how I want it
> sorted
> ?
> Jack
>
>
> --
> Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> Den har indtil videre sparet mig for at få 45071 spam-mails.
> Betalende brugere får ikke denne besked i deres e-mails.
> Hent gratis SPAMfighter her: www.spamfighter.dk
>|||I think this is somehow difficult, doesn't other designers need to sort the
result differently based upon fields ?
Jack
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> skrev i en meddelelse
news:eZbuG$DuFHA.3740@.TK2MSFTNGP14.phx.gbl...
> Create a function in the code area which accepts the Parameter ( 1,2 or
3 )
> and all of the fields you wish to sort on..
> The function should use the parameter in a case/switch statement to choose
> which value to return. In one case it should return the value of the
> expression you mentioned.
> In the sort column pu
> =Code.GetSort(Parameters!SortVal.Value,......)
> Hope this helps...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
> news:ebEGvm9tFHA.1472@.TK2MSFTNGP15.phx.gbl...
> >I need to sort a report in 3 ways 2 fields and one expression.
> >
> > When i add a field to a parameter it says the following:
> >
> > "Fields cannot be used in report parameter expressions"
> >
> > The expression I need to sort on is this
> > =(sum(Fields!p1beløb.Value) - sum(Fields!p2beløb.Value)) /
> > (0.001+sum(Fields!p1beløb.Value))
> >
> > It works if I use this as sort on the group item, but I need to choose
> > between 3 kinds.
> >
> > How can I sort the report if I can't use fields to tell how I want it
> > sorted
> > ?
> >
> > Jack
> >
> >
> >
> >
> > --
> > Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> > Den har indtil videre sparet mig for at få 45071 spam-mails.
> > Betalende brugere får ikke denne besked i deres e-mails.
> > Hent gratis SPAMfighter her: www.spamfighter.dk
> >
> >
>
No comments:
Post a Comment