I am trying to get a sum of a formula which contains variables. The formula field does not show up as an option to be able to summarize. When I tried doing it mannualy, I got an error saying the filed can't be summarized. Is there a workaround?
You could use the three-formula method. Can't tell whether you are trying to summarize at the group level, but let's assume that you are:
//{@reset} to be placed in the group #1 header:
whileprintingrecords;
numbervar sumformula := 0;
//{@accum} to be placed in the section where your formula is (detail or group #2 header):
whileprintingrecords;
numbervar sumformula := sumformula + {@yourformula};
//{@display} to be placed in the Group #1 footer:
whileprintingrecords;
numbervar sumformula;
For additional help, you should provide your report structure (groups,etc.) and also the content of your {@yourformula}.
The above is giving me a 0.00, let me give you more details of my report (I have just been given a couple of changes anyway).
Group#1 - Client
Group#2 - Severity Level
Can have up to 3 groups for each client; high, medium and low
Group#3 - Incident#
Here I have 2 formulas per incident#, OpenToResponse and OpenToClose:
OpenToResponse (the # of hours between the Open time and the status time) = evaluateafter({@Variables});
tonumber((datetimevar Response-datetimevar Open)*24);
OpenToClose (the # of days between the Open time and the Closed time)= evaluateafter({@Variables});
tonumber(datetimevar Closed-datetimevar Open);
The ultimate goal here is to create a chart for each Client that shows the avg OpenToResponse and OpenToClose for each Severity Level (group#2) as well as the avg OpenToResponse and OpenToClose overall.
I really appreciate any help...I've never been great with these variables, and up until now haven't had to use them much....BTW, not sure if it matters, but I am on version 9
I actually need to avg, not sum. I need to average the OpenToResponse and the OpenToClose for each severity level per client.
My {@variables} formula is (placed in RH):
whileprintingrecords;
datetimevar Open;
datetimevar Response;
datetimevar Closed;
Open:=NthSmallest (1, {Incident_History.ChangeDate}, {Incident_History.IncidentID});
if previous({Incident_History.ChangeDate})=Open then Response:={Incident_History.ChangeDate};
if {Incident_History.Status}="07. Pending Closure" then Closed:={Incident_History.ChangeDate}else
if {Incident_History.Status}="08. Suspended" then Closed:={Incident_History.ChangeDate}else
if {Incident_History.Status}="09. Deferred to Future Release" then Closed:={Incident_History.ChangeDate}else
if {Incident_History.Status}="11. Closed" then Closed:={Incident_History.ChangeDate} else datetimevalue(0,0,0,0,0,0)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.