Rate calculation ?

Stimulsoft Reports.NET discussion
Post Reply
hetptech
Posts: 3
Joined: Wed May 30, 2007 10:50 am

Rate calculation ?

Post by hetptech »

Hi,

I have to create a report including some rates.
I can not figure out how to do that..
Any help would be really welcome...




Context :

Each data row contains : Date - Month - Project Name - Nb of Hours
--------------------------------------------------------------------
01/01/2007 - January - Project 1 - 5
02/01/2007 - January - Project 1 - 5
03/01/2007 - January - Project 2 - 2
04/01/2007 - January - Project 2 - 3
05/01/2007 - January - Project 2 - 3
06/01/2007 - January - Project 2 - 2
07/01/2007 - February - Project 1 - 5
08/01/2007 - February - Project 2 - 5
09/01/2007 - February - Project 2 - 5
10/01/2007 - February - Project 2 - 5
--------------------------------------------------------------------

What I need to get :
--------------------------------------------------------------------
January Nb of hours Rate
Project1 - 10 - 50%
Project2 - 10 - 50%

Total - 20 - 100%


February
Project1 - 5 - 25%
Project2 - 15 - 75%

Total - 20 - 100%

etc...
--------------------------------------------------------------------

I created a report with 2 groupheaderbands.
The first one has a condition on the "Month" field
The second one has a condition on the "Project" field
Sums calculation are OK.

But how to calculate rates ?
Is there a mean to pre-calculate the monthly sum of hours, store it in a variable, and then use it for calculating rate by project ?
I guess I need a "2 steps" process (the first step to calculate the monthly sum, the second one to calculate the rates), but I can not figure out how to do that...
Thanks for your help...
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Rate calculation ?

Post by Vital »

In this case you can use datasource "Data from other Data Source" in report dictionary. With this type of datasource you can group data as you need before printing.

Thank you.
hetptech
Posts: 3
Joined: Wed May 30, 2007 10:50 am

Rate calculation ?

Post by hetptech »


Hi Vital,

I'm not sure to understand your answer.
My datasource is currently made of objects and I can not change that..

In your previous answer, did you suggest changing my current datasource (that is not doable in my context) or to create a new one with the type "Date from other Data Source" ? If you suggested this second point, please could you precise where to define this kind of datasource. I only have these available types :

Data from Business Objects
Date from DataSet, DataTables
Date from DataViews
Date from Enumerable Sources
Date from SQL Connection
Date from OleDb Connection
Date from User Sources
Date from Virtual Tables

Many thanks
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Rate calculation ?

Post by Vital »

I mean second point. This is special type of data source which use existing data.
Please say me which version of StimulReport.Net you are use?

Thank you.
hetptech
Posts: 3
Joined: Wed May 30, 2007 10:50 am

Rate calculation ?

Post by hetptech »

I use StimulReport.net embedded in a commercial application (Toucan Reporter from InfoPatterns, an app to create reports based on data stored in Groove)
The "stimulsoft.report.dll" version is 1.23.0.0
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Rate calculation ?

Post by Vital »

This version does not contain this type of data source. We will try prepare solution for you. We will inform you about progress in this topic.

Thank you.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Rate calculation ?

Post by Vital »

You have only one way - calculation totals in script in BeginRenderEvent of first page:

Code: Select all

datasource.First();
while (!datasource.IsEof)
{
.................
.................
datasource.Next();
}
Thank you.
Post Reply