Page 1 of 1

Totaling Text Fields

Posted: Thu Jan 15, 2009 1:32 pm
by mmurdock
I have a text filed that is calculating totals based on detail bands. I would like to get a grand total for the report. Is there a way to total up text fields such as {Sum(text1.value)}?

Thanks,

Mat Murdock

Totaling Text Fields

Posted: Thu Jan 15, 2009 3:17 pm
by Edward
Hi Mat,

Please use the following expression:

{Totals.Sum(MyDataSource,MyDataSource.MyDataColumn)}

Please open attached sample in the Demo.exe sample application and see fields with Red background.

Thank you.

Totaling Text Fields

Posted: Fri Jan 16, 2009 10:55 am
by mmurdock
I don't think that does what I need. Here is the layout of my report

Equipment Item (kimr_equipment)
--Rental Invoice (kimr_depreciated_band)
--Rental Maintenance (kimr_ap_job)
--Acquisition Freight (kimr_po_distributions_band)

So I have a master item, then 3 detail bands under it. I have the following calculation that show on the master band that takes totals from some of the detail bands and does a calculation to find book value. This calculation is as follows:

{(kimr_equipment.acquisition_cost + Totals.Sum(kimr_po_distributions_band,kimr_po_distributions.cost_difference)) - Totals.Sum(kimr_depreciated_band,kimr_depreciated.rental_cost)}

Now at the bottom of the report on the report summary band they want to total up the results of that field that is in the master band. Any ideas on how to do this?

Thanks,

Mat

Totaling Text Fields

Posted: Tue Jan 20, 2009 3:14 am
by Edward
Hi Mat,

Unfortunately in this case you have to use variables to calculate the overall results.

Thank you.

Totaling Text Fields

Posted: Fri Jan 30, 2009 1:54 pm
by mmurdock
Can you give me an example of this with variables. I'm having a bit of a trouble figuring them out.

Thanks,

Mat

Totaling Text Fields

Posted: Fri Feb 06, 2009 11:54 am
by Edward
Hi Mat,

In the BeforePrintEvent of the DataBand on which these text fields have been placed you need to write the following:

MyVariable = MyVariable+ExpressionWhichYouCalulateInEachTextComponent;

MyVariable is a variable of decimal type. You must declare this variable in the Dictionary if the report.

It does not matter that stiTexts are in the Detail bands. They will be calculated in any case.

If still in trouble, please send a report template, data and a brief explanation to support[at]stimulsoft.com.

Thank you.

Totaling Text Fields

Posted: Wed Feb 11, 2009 4:19 pm
by mmurdock
That worked thanks.

Mat

Totaling Text Fields

Posted: Thu Feb 12, 2009 9:33 am
by Edward
Hi Mat,

Please let us know if any additional help is required.

Thank you.