Running totals by field
I am trying to create a recap document for a survey. Where you enter the results in individual fields....the same field keeps a running total after entering each number....i did this first in excell.....the field code was RT=0 for excell.....am lost how to make this happen in adobe livecycle design....please help someone.........
Hi,
If I got it right, you would like to use 'Record Sort Expert' with running total fields. In this case, you cannot sort by running total fields using 'Record Sort Expert' because of the way Crystal Reports processes the report (three-pass reporting method).
When a report is created, the 'three-pass reporting method' should be taken into consideration to avoid inconsistencies.
Further information on this reporting method is available in Crystal Reports Online Help (From Crystal Reports, press F1).
I hope this helps,
Selenia
Similar Messages
-
Running Total Issue or Possibly Formula Issue in Crystal Reports 9
Post Author: Jeffs23
CA Forum: Formula
My issue involves two formula's - @TotalTime and @Converted Time and a Running Total (RTotal0).
@TotalTime{Data.ApptTime}/60@Converted Timenumbervar x := {#RTotal0};totext(truncate(x),0,"")" Hrs "totext(remainder(x,truncate(x))*60,0,"") + " Mins"Running Total (RTotal0)
Field to Summarize - @TotalTime
Type of Summary - sum
Under Evaluate Section:
"Use a Formula":
onfirstrecord or
{Data.ResourceStart} <> previous({Data.ResourceStart}) or
{Data.Resource} <> previous({Data.Resource})
) and
minimum({Data.ApptKind},{Data.ResourceStart}) = 1 AND
maximum({Data.Column},{Data.ResourceStart}) >= '1'
Reset on change of field {Data.Resource}
A little background:My report deals with a Doctors schedule. In the doctors schedule, a appointment is booked and is by default placed into Column 1. It always defaults to Column 1. If the provider elects to double book their time and schedule another patient at the exact same time, the second appointment hits column 2. It expands in essence. It is possible to have up to 4 appointments in one time slot. This is why we wait forever at the Doctors office - appointments get overbooked because patients cancel or no show frequently and the provider would rather have the patients wait then risk no appointment at all. My Client wants the "TOTAL TIME" a provider was "scheduled" to see patients, not the time they actually saw the patients. So if the Provider was scheduled to see patients from 8 am to noon and had patients doublebooked for every time slot, I only want to report the overall time he saw patients regardless of the doublebooking, triplebooking or quadruplebooking. So the total time for my example should be 4 hours not 8 hours. The good news is this is painfully close to being correct! What is currently happening, is if the schedule contains more than 1 facility the time calculates wrong. I think my issue may be in the running Total but not 100% sure. I need it to calculate time on each facility - {Data.Facility}.Post Author: Jeffs23
CA Forum: Formula
I had some minor issues with my formulas and Running Total so I modified them alittle:
@TotalTime
If {Data.ApptTime} = 0 then 0else {Data.ApptTime}
@Converted Time
If {#RTotal0} = 0 then "--"else ToText(Truncate({#RTotal0}/60),0,"") + " Hour(s), " + ToText(Remainder({#RTotal0},60),0,"") + " Min(s)"
My running total stayed the same.......
Field to Summarize - @TotalTime Type of Summary - sum Under Evaluate Section: "Use a Formula":(onfirstrecord or{Data.ResourceStart} <> previous({Data.ResourceStart}) or{Data.Resource} <> previous({Data.Resource}) ) andminimum({Data.ApptKind},{Data.ResourceStart}) = 1 AND maximum({Data.Column},{Data.ResourceStart}) >= '1' Reset on change of field {Data.Resource}
Some fake sample data:
Resource = Francis, William MD
Facility 1: River Oaks Main Clinic
Facility 2: Western Medical Hospital
Date of Service = 10/25/2007
From 7:15 am to 11:45 am, Patients were treated at Facility 1: River Oaks Main Clinic *** (total time = 4 hours 30 min)
From 12:15 pm to 1:00 pm, Patients were treated at Facility 2: Western Medical Hospital *** (total time = 45 min)
From 1:00 pm to 3:15 pm, Patients were treated at Facility 1: River Oaks Main Clinic *** (total time = 2 Hours 15 min)
The report should tell me Total time at River Oaks Main Clinic = 6 Hours 45 min and 45 min for Western Medical Hospital. What it currently is doing, is reporting the 6 Hours 45 min on the River Oaks Main Clinic and 7 Hours 30 min on the Western Medical Hospital. The time for this facility should be 45 minutes, yet its taking the full provider time and throwing it into this second facility. I am assuming its because the Running total tells it "Reset on change of field {Data.Resource}". Somehow, I need it to evaluate on both the Resource and the Facility. Any suggestions? -
Running totals in crystal designer
Hi all!
I want to create a report with running total, that accumulate Balance value for each page.
Total accumulate should be reseted on each new page.
I have a query for report: SELECT CardCode, CardName, Balance FROM OCRD.
And i want a running total for field "Balance" (this total should be reseted on each new page).
In Crystal Designer I create new Running Total Field (in the PageFooter section).
In the Editing Running Total window I fill the following sections:
1) Summary section. Field to summarize: "Command.balance". Type of summary: "sum".
2) Evaluate section. On change of field: "command.cardcode"
3) Reset section. I want to choose PageNumber in the field "on change of field". But there is no any special field in the section "Available tables and fields"
How to reset the running total on each new page?
Thanks in advanceHi all!
The problem can be solved with report formulas. Probably this information will be useful to somebody.
So, we have the following task: need to calculate subtotals on each page.
Let's look at the solution.
On the first step, create Formula fields:
1) InitPageSum field has formula:
WhilePrintingRecords; NumberVar PageSum := 0;
2) CalcPageSum field has formula:
WhilePrintingRecords;
numberVar PageSum := PageSum + {Command.LineTotal}; // I use command to get field-values from //database
numberVar PageSum
3) PageBalance field has the following formula:
WhilePrintingRecords; numberVar PageSum
On the second step we place formula-fields in report sections.
1) Variables initialization.
Insert section in PageHeader area (lets name this section PHa). Drag formula InitPageSum into PHa for zeroing PageSum for each page. Then suppress the section PHa.
2) Increasing subtotal on page.
Create additional section in Details area (Dc). Drag CalcPageSum formula-field on this section (Dc). PageSum variable will be increasing in each line. Suppress the section Dc.
3) Display results.
a) Insert additional section in PageFooter area (let's name it PFa). Drag PageBalance formula-field into this section (PFa). The section PFa should be displayed on each page of the report, except the last page. The formula is:
if PageNumber <> TotalPageCount then true else false.
b) Insert additional section in ReportFooter area (let's name it RFa) and make this section the first section of the Report Footer area. Drag PageBalance formula-field into the section RFa. The section RFa should be displayed on the last page only. So, for the Suppress property of this section, create the formula:
if PageNumber = TotalPageCount then true else false
We make this adjustment (additional section in report footer area) because we need subtotals directly under the report (and not at the bottom of the page)
Best regards,
Katrine -
Running Total - How to summarize a formula field?
I'm sorry if this comes over as stupid but I have got myself quite messed up and am not 100% au fait with Crystal Reporting.
The aim of my report is to calculate the costs of selected tests and to calculate a grand total of all tests at the end.
I have created a group of jobtests.TestTypeName
Details
1. testTypeName - to show Test Name that is being calcutaed - Database field
2. Count ({jobTests.testTypeName}, {jobTests.testTypeName}) - to show number of tests of that type - this is a formula field
3. Analysis1 - to show the cost of that test type - Database field
4. {@CountTests/TestType} * {jobTests.AnalysisN1} - to show the number of tests per test type mulitplied by the cost of that test type - this is a formula field
Report footer
Count ({jobTests.testTypeName}) - to count the total number of tests
MY PROBLEM - I need to see the sum of 4, this would be my grand total
Trying to run the Running Total I can't get it to Summarize the field 4 because it is a formula field.
What can I do?
Thanks.You can't do a SUM on a formula that uses another aggregate function. However, for both 4 and your grand total, you just need to SUM() (with ",{jobTests.testTypeName}" for the #4 calc), as the database field will be the cost for each test in each record.
HTH,
Carl -
Running total of calculated field in pivot
VERSION: ORACLE 11
TABLE:
create table chart_detail (
DIS NUMBER,
BLD_MO VARCHAR2(7),
BLD NUMBER(10),
RPLC NUMBER(10));DATA:
insert into chart_detail values (60,'2011-03',0,2);
insert into chart_detail values (150,'2011-04',10572,0);
insert into chart_detail values (120,'2011-04',26449,5);
insert into chart_detail values (30,'2011-04',0,1);
insert into chart_detail values (60,'2011-04',0,7);
insert into chart_detail values (90,'2011-04',0,9);
insert into chart_detail values (120,'2011-05',5714,0);
insert into chart_detail values (90,'2011-05',24557,1);
insert into chart_detail values (60,'2011-05',0,4);
insert into chart_detail values (30,'2011-05',0,0);
COMMIT;EXPECTED RESULTS:
2011-04 2011-05
DIS RPLC BLD TBLD IPTV RPLC BLD TBLD IPTV
30 1 0 37021 0.03 0 0 30271 0.00
60 7 0 37021 0.22 4 0 30271 0.13
90 9 0 37021 0.46 1 24557 30271 0.17
120 5 26449 37021 0.59 0 5714 5714 0.17
150 0 10572 10572 0.59 0
180 0 0
TOTAL 22 37021 5 30271 PROBLEM: I need to have a running total of IPTV like in the above example. I can get the IPTV for each DIS/bld_mo but I don't know how to get the running total of it. In the script below I just used an example where I tried summing the IPTV like was done for build. I know it can't be done that way because IPTV is a calculated field in the query but if I substitute "APR_IPTV" with the formula for IPTV I get an error that window functions aren't allowed here. I do not know a way around this. I commented out the bad piece of code.
PROBLEM SCRIPT:
WITH pivot_results AS
SELECT dis
, NVL (apr11_rep, 0) AS apr11_rep
, NVL (apr11_bld, 0) AS apr11_bld
, NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS apr11_tbld
, DECODE(NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(apr11_rep, 0)*1000/ NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS apr11_iptv
, NVL ( SUM (apr11_iptv)
OVER (ORDER BY dis DESC)
, 0
) AS apr11_tiptv
, NVL (may11_rep, 0) AS may11_rep
, NVL (may11_bld, 0) AS may11_bld
, NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS may11_tbld
, DECODE(NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS may11_iptv
, DECODE(NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS may11_tiptv
FROM chart_detail
PIVOT ( MAX (rplc) AS rep
, MAX (bld) AS bld
FOR bld_mo IN ( '2011-04' AS apr11
, '2011-05' AS may11
SELECT CASE
WHEN GROUPING (dis) = 0
THEN TO_CHAR (dis)
ELSE 'Total'
END AS dis
, SUM (apr11_rep) AS apr11_rep
, SUM (apr11_bld) AS apr11_bld
, SUM (apr11_tbld) AS apr11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN SUM (apr11_iptv)
END AS apr11_iptv
, SUM (apr11_tiptv) AS apr11_tiptv
, CASE
WHEN GROUPING (dis) = 0
THEN SUM (apr11_tpiptv)
END AS apr11_tiptv
, SUM (may11_rep) AS may11_rep
, SUM (may11_bld) AS may11_bld
, SUM (may11_tbld) AS may11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN SUM (may11_iptv)
END AS may11_iptv
FROM pivot_results
GROUP BY ROLLUP (dis)
ORDER BY pivot_results.dis
;Thank you,Hi,
So you know how to compute iptv for an individual row; the problem now is that you want to get a running total of iptv; is that it?
The problem there is that computing iptv requires an analytic function, and analytic functions can't be nested. To get the results of nesting f (g (x)), where f and g are analytic funtions, you have to compute g in a sub-query, and then use the results as the argument to f in a super-query.
Here's how to apply that to your situation:
WITH pivot_results AS
SELECT dis
-- April, 2011
, NVL (apr11_rep, 0) AS apr11_rep
, NVL (apr11_bld, 0) AS apr11_bld
, NVL ( SUM (apr11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS apr11_tbld
, NVL ( 1000 * apr11_rep
/ NULLIF ( SUM (apr11_bld) OVER (ORDER BY dis DESC)
, 0
, 0
) AS apr11_iptv
-- May, 2011
, NVL (may11_rep, 0) AS may11_rep
, NVL (may11_bld, 0) AS may11_bld
, NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0
) AS may11_tbld
, NVL ( 1000 * may11_rep
/ NULLIF ( SUM (may11_bld) OVER (ORDER BY dis DESC)
, 0
, 0
) AS may11_iptv
FROM chart_detail
PIVOT ( MAX (rplc) AS rep
, MAX (bld) AS bld
FOR bld_mo IN ( '2011-04' AS apr11
, '2011-05' AS may11
SELECT CASE
WHEN GROUPING (dis) = 0
THEN TO_CHAR (dis)
ELSE 'Total'
END AS dis
-- April 2011
, SUM (apr11_rep) AS apr11_rep
, SUM (apr11_bld) AS apr11_bld
, SUM (apr11_tbld) AS apr11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN ROUND ( SUM (SUM (apr11_iptv))
OVER (ORDER BY dis)
, 2
END AS apr11_iptv
-- May 2011
, SUM (may11_rep) AS may11_rep
, SUM (may11_bld) AS may11_bld
, SUM (may11_tbld) AS may11_tbld
, CASE
WHEN GROUPING (dis) = 0
THEN ROUND ( SUM (SUM (may11_iptv))
OVER (ORDER BY dis)
, 2
END AS may11_iptv
FROM pivot_results
GROUP BY ROLLUP (dis)
ORDER BY pivot_results.dis
;Output:
APR11 APR11 APR11 APR11 MAY11 MAY11 MAY11 MAY11
DIS _REP _BLD _TBLD _IPTV _REP _BLD _TBLD _IPTV
30 1 0 37021 .03 0 0 30271 .00
60 7 0 37021 .22 4 0 30271 .13
90 9 0 37021 .46 1 24557 30271 .17
120 5 26449 37021 .59 0 5714 5714 .17
150 0 10572 10572 .59 0 0 0 .17
Total 22 37021 158656 5 30271 96527As you can see, this is not quite what you wanted on the row where dis='150'. You asked for NULLS in the may11_rep, may11_bld and may11_iptv columns. You can get those results if you need them; just explain the rules that govern whether to display the values and when to display NULL.
The way you posted the sample data and results, and the quantity of sample data were all excellent; it really helped me find a solution. Thanks.
It would have also helped it you had explained how iptv is computed. Basically, iptv = 1000 * rep / tbld, right?
It looks like most of this code:
, DECODE(NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),0,0,ROUND(NVL(may11_rep, 0)*1000/ NVL ( SUM (may11_bld)
OVER (ORDER BY dis DESC)
, 0),2
)) AS may11_iptvwas a way of avoiding divide by 0 errors; it would have been helpful if you had explained that. -
Need to sum hh:mm:ss in crystal report using Running Total Fields
Hello,
I am new to .Net and crystal reports so please go easy on me.
I am trying to develop a crystal report using Visual Basic .NET. I have a column which displays the "Inbound Time" in "hh:mm:ss" format. I have to sum the total inbound time and display it.
I tried using the Running Total and i am not successful.
Here is the code which I am using in the Running total
WhilePrintingRecords;
if isNumeric({Report3;1.TotalInboundTime}) then
{Report3;1.TotalInboundTime}
else
CStr ({Report3;1.TotalInboundTime});
NumberVar array test2 := [ToNumber(left(CStr({Report3;1.TotalInboundTime}),2)),ToNumber(mid(Cstr({Report3;1.TotalInboundTime}),4,2)),ToNumber(right(Cstr({Report3;1.TotalInboundTime}),2))];
StringVar test1 := CStr( (ToNumber(test2[1])3600)+(ToNumber(test2[2])60)+(ToNumber(test2[3])));
InboundTime is the time field which is in "hh:mm:ss" format.Hello Bharathi,
There are a couple of KBs about this. I haven't tested them myself, but you could give them a try:
[How sum multiple time fields in Crystal Reports|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2008378]
[Creating a running total to show the difference between two datetime fields |http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010261]
[Totalling time values that are stored as numbers in the database|http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2005576]
Cheers,
Fritz -
Require a formula to calc the diff between 2 running total fields in a crosstab
Post Author: PJM
CA Forum: General
Hi,
I have built a crosstab in Crystal XI with the following columns:
PROFILED BUDGET (a) EXPENDITURE TO DATE (b) VARIANCE (a-b)
The profiled budget and expenditure to date columns are both running total fields. I want the variance column to show the difference between the budget and expenditure.
To set the variance field up as a running total, I assume that I would have to specify that I want this formula evaluated after the budget and expenditure fields , however, I can't work out how to do this on a crosstab.
Moving the crosstab to the report footer has had no impact.
If I try to create a basic formula using the running totals, I get the error message "A summary has been specified on a non-recurring field" - I can't find an explanation of this error message on the help menu.
Can anyone help with this please?overtime hours are calculated after 40. If I work 12 on monday, thats 12 regulars hours. not sure about others states laws but here in wisconsin we consider overtime after 40 only, not after 8 daily. at least thats how my company calculates overtime. lets say I work 10 hours a day, monday thru thursday, thats 40 hours regular time. anything after that is overtime. our weekly work schedule starts on sunday and ends on saturday. so on my bi-weekly time log, if i work 10 hrs a day monday thru thursday, i want 10hrs each day in regular hours cell, then when i work friday and or saturday, i want those hours in overtime hours. the main problem im having is: if i reach 40 hours in the middle of a day, i want the regular of that day to end and the overtime to pick up on the same day.
here is a basic example of how i want regular and overtime to look. of course the values will be duration not just numbers. hope this helps explain what i need a bit better. -
Multiple Reset in Running Total Field
Hello,
I have defined 2 groups in my report
I have a running total field that it reset on group #2 changes.
Sometimes, Group #1 changes but Group #2 doesn't changes therefore the running total field doesn't reset.
I need to define the running total field that it reset on group #2 changes or on group #1 changes too.
Thanks,I will expand my issue with an example:
Group #1 : Account Number
Group #2 : Company Name
Movements Details, Debit, Credit, Balance (Running Total Field)
Total Group # 2
Total Group # 1
Sometimes, a account number exist in company 1 but not in company 2. Therefore, group #1 changes meanwhile group #2 does'nt change and as a result the Running Total Field does'nt reset. -
Running total field which evaluates based on another running total field
I'm figuring out how to use running totals in my reports.
For each ProductCategory, there're many Products.
For each Product, there're different ProductVersions.
For each ProductVersion, it takes different Parts.
My report should look like this
Group1: ProductCategory (e.g. Catergory 1)
Group2: Product (e.g. Product1)
Group3: ProductVersion 1
Details: Version 1: 3 * Part1 + 2 * Part2 + 4 * Part3
GpFooter3: Total of 9 parts used
Group3: ProductVersion 2
Details: Version 2: 1 * Part1 + 2 * Part2 + 3 * Part3
GpFooter3: Total of 6 parts used
Group3: ProductVersion 3
Details: Version 3: 2 * Part1 + 2 * Part2 + 3* Part3
GpFooter3: Total of 7 parts used
I've a running total at GpFooter3 to count number of parts, reset on change of Group3.
But for each Product, I'm only interested in the details of the most recent version, that is the version with the greatest version number. So I hide all details and GpFooter3, and want to show
GpFooter2: Product1, ProductVersion3, 7 parts
How can I make a running total at GpFooter2 to select the ProductVersion which has the greatest version number among the Group "Product1"? The problem is, the number of versions for each Prodcut is not fixed, so I can't create a running total which evaluates on a particular version number. I tried to use a running total to obtain the maximum version number per Product, but I can't use this in the running total at GpFooter2 as a evaluation formula.
Your help is much appreciated. Thank you very much.Create formula fields that are placed in Group Footer 3 that store the value(s) in global variables (basic syntax):
global maxVersion as number
global numParts as number
maxVersion = {version}
numParts = count({part}, {version}) ' Assuming grouped on {version}
formula = ""
Then use other formula fields to retrieve the values:
global maxVersion as number
formula = maxVersion
And similarly for numParts...
HTH,
Carl -
Summary on a formula field that makes a condition on a running total
Hi,
How come I can't create a summary on a formula field that makes a condition on a running total ?
My running total field is a counter that counts the number of individuals
My formula field contains this info :
IIF ( ( {#counter_running_total} <> 1)
or ( {#counter_running_total} = 1
and {status.code} = '04' )
or ( {#counter_running_total} = 1
and {status.code} in \[ 208 , 996 ])
,0,1)
When I right-click on the formula field to insert a summary, it does not allow me.
Do you have any idea I can show the information in a better way ?
Thanks
Steph
Edited by: Stephanie Charest on Aug 4, 2008 8:00 PMThank you very mutch for your reply, I tried it and it works.
The thing is, I would like to reset the counter on change of group, and put the manual running total in the group footer.
Is there a formula I could use to reset the counter ?
When I write in the group header :
whileprintingrecords;
numbervar i=0;
it does not reset the i to zero, instead, it writes "false" and continues to increment in the footer.
do you have an idea ?
Thank's
Steph -
Running Total Fields - using formula, but can't get what i want?
Hi All,
I have already searched some forum, but still can't figure out what going wrong. Can anyone help me?, please
I create a view from access named u201CStatementReportu201D and have the following field.
<InvNo>
<CustNameC>
<JobItemNo>
<InvDate>
<JobTypeId>
<JobPrice>
I create three parameter as CustName, StartDate, EndDate, then I create a Group to group <InvNo> as the report detail and a Running Total Fields for calculate the total of <JobPrice>.
So far the report is fine. Showing the grouped <InvNo> and the total amount of <JobPrice>
Then, I want to calculate the <JobPrice> by the condition of <JobTypeId>.
First, I create a new Running Total Fields
Field to summarize = StatemetnReport.JobPrice
Type of summary = sum
Second, I create a formula as following
whileprintingrecords;
global numbervar type1_sum :=0 ;
if {statementRe.JobTypeId} = 1 then
type1_sum := type1_sum + {statementRe.JobPrice};
type1_sum;
After completed the formula, and i press Ok button.
A dialog appear "Warning: Reset/evaluate condition formula contains variables. Do you want to keep it?"
No matter i click Yes or No, I still can't get anything display on the field.
Edited by: manho88 on Mar 9, 2010 9:42 AMHi,
Instead of running total use can try this formula.
Place this formula in the details section.
whileprintingrecords;
numbervar jpsum;
if =111 then
jpsum:=jpsum +
else 0;
You can modify this formula as per your requirement.
Hope this helps. -
Keeping a Running Total for Formula fields
Post Author: khanh
CA Forum: Formula
I've been messing around for the past couple of days trying to figure out what the best approach for my problem. So here is what I'm trying to accomplish. I have multiple rows which contains sums for different columns and one of the columns contains the maximum of the sums.
For example:
ROW 1 SUM (A) SUM(B) SUM(C) MAX(sum(a), sum(b), sum(c))<----
Formula Variable 1
ROW 2 SUM (A) SUM(B) SUM(C) MAX(sum(a), sum(b), sum(c))<----
Formula Variable 2
ROW Total SUM (1A2A) SUM(1B2B) SUM(1C+2C) Result of Row 1 + Result of Row 2
What I did was create a formula variable that evaluates the maximum of those rows and have a summary row, that keeps a running total. I'm not sure how to store the result of that formula variable in the running total since the formula variable isn't an option to select. Does anyone have a suggestions if this is a good approach or if there's another way to approach it?For each value you enter into scores.text, end it with a
+"\n"
as in...
scores.text = String(1100) + "\n";
scores.text += String(2200) + "\n";
scores.text += String(1500) + "\n"; -
How do I use a running total within a selection formula?
I am developing a report within Crystal Reports 2008. My goal is to identify any accounts that have zero usage for at least six months in this current year. I have account number, meter size, read date, usage, and a running total/subtotal by account.
Here is what the data looks like in the report
ACCTNO METER SIZE READ DATE/TIME READ_USAGE Counter
001022-05
001022-05 2.00 9/28/2009 9:42:00 AM 0.00 1
1
001110-09
001110-09 2.00 3/2/2009 9:54:13 AM 0.00 1
001110-09 2.00 3/26/2009 1:32:28 PM 0.00 1
001110-09 2.00 4/27/2009 11:02:11 AM 0.00 1
001110-09 2.00 5/27/2009 1:13:53 PM 0.00 1
001110-09 2.00 6/19/2009 11:41:20 AM 0.00 1
001110-09 2.00 9/1/2009 8:13:25 AM 0.00 1
6
My report shows all accounts that have zero usage. I want to filter the report to only show the accounts that have at least six zero usage reads. I thought I could add a running total, sum it, and filter the data by using the selection formulas. Unfortunately I keep getting an error message saying "this field cannot be used becuase it is being evaluated later." Any help would be appreciated. This is the first report I have created using crystal.
Edited by: smwdrw2 on Oct 28, 2009 4:29 PMYou could Conditionally suppress the account numbers where your running total is less than 6
You will probably have to put your account number summaries in the group footer, instead of the header.
Then:
go to the section expert, click on the group footer for the account number, on the right, next to the word "Suppress" click on the box that says "X-2". In the formula put
IF<6 then True
Save and close
The only way this would not work for you is if you have some sort of grand total that you don't want to include the other groups in. -
Error when using running total variable in formula
This is probably an easy syntax problem, but I'm fairly new to Crystal reporting. I created a running total variable (count) called InquiryTypeSubtotal that simply counts the number of records. I have one grouping level, and in the group footer I'd like to print a line showing the total count for that group that looks like
Total inquiries for Assistive Technology: 3
To accomplish this I'm using a formula field with the following syntax:
"Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText(@InquiryTypeSubtotal)
When I try to check the formula, I get the error message "The ) is missing." What am I doing wrong?
Thanks,
AlecI put in the curly brackets so my formula now reads
"Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText({@InquiryTypeSubtotal})
Now when I check the formula I get the error message "This field name is not known."
Alec -
Running totals: Custom Reset via Formula? (VS 2005)
Post Author: PunchngMrGrumpy
CA Forum: .NET
Hi All,I have attached a screenshot to help make up for my inability to describe the situation I'm dealing with here.I
have three groups within a report that currently use distinct Running
Totals fields that Reset at the group levels that I assigned. I am
attempting to create a single Running Totals field for all 3 groups
that will reset depending on which Group is being calculated at the
moment so that I don't have to have 3 separate Running Totals object
for each and every group. I'm not sure how to do this or write this
formula as I'm new to Crystal Reports and am used to SQL Reporting
Services where this evaluation is automatically done for you (I was
spoiled I guess).For example, if the Running Totals field
control is in Group #1, I want it to reset at Group #1, and Group#2 to
reset at Group #2, etc without having to create a field for each group.So
basically I'm attempting to use a formula to create a Reset point (view
screenshot for detail) that is determined by which group the data is
being calculated in. Is this possible? I realize that it is possible by
simply creating a new running total object for each group and telling
it to reset on change of group specified, but this seems completely
redundant and overly time consuming for larger reports where there are
multiple groups and a lot of Running totals fields.I'm developing the report with Crystal Reports within Visual Studio 2005 if that helps any.I
don't know if you'll be able to see it, but I have a screenshot link to
explain what I'm trying to do. http://www.codeguru.com/forum/attachment.php?attachmentid=19302Thanks!Hi Abhilash,
Thanks for the code, but the totals aren't right still yet.
Also, I just noticed my running total is not functioning properly. Count be the reason for my delima.
Any suggestions on how to get the running total to function properly?
What I just noticed is:
Date Patient Count
7/9/13 Patient A 7
8/8/13 Patient B 8
8/8/13 Patient B 8
8/8/13 Patient C 8
8/8/13 Patient D 8
8/15/13 Patient E 9
Would I be better off to do a formula vs a running total?
Maybe you are looking for
-
How to put music in a menu....URGENT!!!
Hi everyone: I'm making a DVD with 12 menus and I need a different music in each one. My problem is when I assign the sound file to a menu this one became very BIG 512MB +/- is there any other way to put a sound in menu?? or any idea to get it smalle
-
FRM-40735: When validate item raised unhandled exception ora-04063
hi experts, FRM-40735: When validate item raised unhandled exception ora-04063 I have noticed the below error on my instance while trying to test some functionality. My EBS Version is R12.1.1 +11.1.0.7 db. Please advise. regards Mohammed. Abdul Muqee
-
Shuffle, Grouping, and Classical Music
Okay, I've been struggling with advanced shuffles in iTunes. Here's the dilemma... most classical music has several movements. This becomes troublesome when I try to shuffle my music. I'll often listen to iTunes for 6 hours running, and would like it
-
When using quick edit for compressed CSS, edge code does not jump to the particular class but displays the whole thing. This destroys the whole purpose. Does anyone know a fix or extension for that.
-
Miro getting error " material moving price negative for particularly plant
Hai Experts , While doing MIRO , I am getting one error Moving average price as a negative price I checked out oss nots , As per oss note solution : raise stock value or change moving average price . Client not accepting to raise value and raise t