dinsdag 21 april 2015

Report Builder / Reporting Services: Reports Without Data? Very Useful!

The report I created here contains no data from an external source. The numbers we see, all come from calculations based on the figures given via the input parameters.


The expressions look like this:

Max Deviation:

=Code.BerekeningNorm(Parameters!parNormAfwijking.Value,Parameters!parProfielLengteNorm.Value)

(based on the upper two paramaters)

Requirement:

=Code.Berekening(Parameters!parMaxAfwijkingNorm.Value, Parameters!parProfielLengteNorm.Value) 

(based on lower parameter and the right upper one)

The function code behind the report:

Function Berekening(MaxAfwijkingNorm as Integer,ProfielLengteNorm as Integer) as Double
Berekening = MaxAfwijkingNorm ^2
Berekening = Berekening + (ProfielLengteNorm / 2)^2
Berekening = Berekening / (2 * MaxAfwijkingNorm)
Berekening = Berekening - ((Berekening^2) -  250000)^(1/2)
End Function

Function BerekeningNorm(NormAfwijking as Double,ProfielLengteNorm as Integer) as Double
BerekeningNorm=NormAfwijking^2
BerekeningNorm = BerekeningNorm + 250000
BerekeningNorm = BerekeningNorm /(NormAfwijking*2)
BerekeningNorm = BerekeningNorm - (BerekeningNorm ^ 2 - (ProfielLengteNorm/2)^2 )^(1/2)
End Function

Een reactie plaatsen