Sunday, March 25, 2012

Calculated Fields

I have two questions regarding calculated fields.
I have a report with two datasets.
Issue 1:
Dataset 1 queries a table that contains configuration information. This
table has one row.
I would like to create a calculated field that divides the value of a
column in this one row but another value in the one row. The problem
appears to be that SRS is expecting the query to return 1 or more rows,
and thus only likes to let me do aggregations on the output from the
dataset. Is there a way to either tell it that there will only be one
row, or a different way to extract the config info from the database
that makes more sense?
Issue 2:
I would then like to use the output of the calculated field from issue
one as part of a calculated field in the second dataset. This seems to
be a problem, as SRS complains with the following statement:
=Sum(Fields!INVOICEAMOUNT.Value, "DailySalesDS") /
Fields!DailyInvoiceProRateMultiplier.Value, "InputDataDS"
Will not compile. I get errors regarding aggregates in report
parameters and about using something from another dataset.
My guess is that I am going about this the wrong way. Any help is
appreciated.In case you missed it, I have answered your questions already in the
"Computed Fields/Multiple Datasources" thread yesterday.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Hunter Hillegas" <hunter.hillegas@.gmail.com> wrote in message
news:chtc25$sd9@.odbk17.prod.google.com...
> I have two questions regarding calculated fields.
> I have a report with two datasets.
> Issue 1:
> Dataset 1 queries a table that contains configuration information. This
> table has one row.
> I would like to create a calculated field that divides the value of a
> column in this one row but another value in the one row. The problem
> appears to be that SRS is expecting the query to return 1 or more rows,
> and thus only likes to let me do aggregations on the output from the
> dataset. Is there a way to either tell it that there will only be one
> row, or a different way to extract the config info from the database
> that makes more sense?
> Issue 2:
> I would then like to use the output of the calculated field from issue
> one as part of a calculated field in the second dataset. This seems to
> be a problem, as SRS complains with the following statement:
> =Sum(Fields!INVOICEAMOUNT.Value, "DailySalesDS") /
> Fields!DailyInvoiceProRateMultiplier.Value, "InputDataDS"
> Will not compile. I get errors regarding aggregates in report
> parameters and about using something from another dataset.
> My guess is that I am going about this the wrong way. Any help is
> appreciated.
>sql

No comments:

Post a Comment