Calculated Colums

Stimulsoft Reports.NET discussion
Post Reply
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Calculated Colums

Post by EDV Gradl »

I can't seem the add calculated colums to my project.

E.G. I add Math.Round(2*2,2) as the formula,

but get the error unknown type or namespace LieferscheinObjekt (My Dataset name)

This is code is created by Stmulreport:

public virtual double Column
{
get
{
return ((LieferscheinObjekt)(this.Dictionary.Report)).Getdbo_ReportLSObjekt_Column();
}
}

Thanks!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Calculated Colums

Post by Edward »

Please try to add the following expression as the formula:

Code: Select all

Math.Round(2d*2d,2) or Math.Round(2*2.0,2) 
C# compiler can't compile expression Math.Round(2*2,2). In the Error List you can see:
Error 6 The call is ambiguous between the following methods or properties: 'System.Math.Round(double, int)' and 'System.Math.Round(decimal, int). You need to specificate double or decimal argument for method Round.
Thanks.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Calculated Colums

Post by EDV Gradl »

That, sadly still does not work.

The erros is:

"The type of namespace 'LieferscheinObjekt' could not be found.

LieferscheinObjekt of my DataSet. The Error is in this lines:

public virtual double Column
{
get
{
return ((LieferscheinObjekt)(this.Dictionary.Report)).Getdbo_ReportLSObjekt_Column();
}
}
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Calculated Colums

Post by Edward »

Please select Report object in Designer's Properties Editor and try to add LieferscheinObjekt in Report ReferensedAssemblies string collection.
If it will not helps or it is another object please send your report to support[at]stimulsoft[dot]com.
Thanks.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Calculated Colums

Post by Edward »

Problem solved.
Thanks.
Post Reply