Compiling problems at conditions in version 2009.3.509.0 - is changing the expression

Stimulsoft Reports.NET discussion
Post Reply
dd@sol-it.at
Posts: 2
Joined: Mon Oct 12, 2009 10:33 am

Compiling problems at conditions in version 2009.3.509.0 - is changing the expression

Post by dd@sol-it.at »

At the field Text12 there is a Condition with expression defined like this:

((double)Sum(ProjectActivities.Duration) - GetWorkTime(new DateTime(ProjectActivities.StartTime.Year, ProjectActivities.StartTime.Month, 1),new DateTime(ProjectActivities.StartTime.Year, ProjectActivities.StartTime.Month, 1).AddMonths(1).Subtract(new TimeSpan(1,0,0,0)))) < 0

Or you could also write:
((double)Sum(ProjectActivities.Duration) - 1) < 0

If the Report is compiled the SourceCode is definitely changed and looks like this and is causing errors:

private void Text12_Conditions(object sender, System.EventArgs e)
{
if (((double)Totals.Sum(ProjectActivities.Duration) this, "GetTotal1") < 0)
{
((Stimulsoft.Report.Components.IStiTextBrush)(sender)).TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Red);
((Stimulsoft.Report.Components.IStiBrush)(sender)).Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Gainsboro);
((Stimulsoft.Report.Components.IStiFont)(sender)).Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0);
((Stimulsoft.Report.Components.StiComponent)(sender)).Enabled = true;
return;
}
}


It seems there is a problem, if a minus “-“ or brackets “)” are present in the condition.

The same report worked fine in Version 2008.1.222.0.

Please help me in this case, because a lot of conditions are used in the reports.
Best regards

Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Compiling problems at conditions in version 2009.3.509.0 - is changing the expression

Post by Jan »

Hello,

It seems that you don't receive our answer via EMail. Please change Sum(ProjectActivities.Duration) to Sum(ProjectActivities, ProjectActivities.Duration).

Thank you.
dd@sol-it.at
Posts: 2
Joined: Mon Oct 12, 2009 10:33 am

Compiling problems at conditions in version 2009.3.509.0 - is changing the expression

Post by dd@sol-it.at »

Hello,

thank you for your answer. You are right, I didn't receive your email concering this case. It works if I use the Sum-Function like Sum (object dataSource, object expression).
But what about the Sum-Function Sum (object expression) that is causing the problem. Will this problem be fixed?

If not I have to change a lot of reports.

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Compiling problems at conditions in version 2009.3.509.0 - is changing the expression

Post by Jan »

Hello,

Patch will be available in few days. I will inform you about progress.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Compiling problems at conditions in version 2009.3.509.0 - is changing the expression

Post by Edward »

Hi

Sorry we could not fix it. You need to change those reports because we extended work of Sum function since and you need to specify a DataSource now explicitely.

We tried to fix that behaviour but it seems that this is not possible for now.

Thank you.
Post Reply