Razzak - I cleared all VARs then SET VAR vTot_Report_HRs numeric 8,1 = 0
then Print reportname.  The var is in a break footer (along with two other
sum of... vars).  The result is always zero.  The DBCalc of the same field
is next to it and the total is correct. The other Sum of... vars also have
the correct totals but they are not numeric type.  The only one that fails
is the sum of the numeric column.  I also tried Albert's suggestion and it
failed also. I tried to duplicate the problem in Concomp but it worked
correctly.  I am beginning to think that my report is corrupted.  I will try
recreating the report.

David - I had null set to on.

Thanks all

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of A. Razzak
Memon
Sent: Friday, May 13, 2005 11:47 AM
To: RBG7-L Mailing List
Subject: [RBG7-L] - Re: SUM OF... problem in reports


At 01:26 PM 5/13/2005, John Engwer wrote:

>The var is predefined.
>The data that I am summing is in the detail band.
>
>When I run the report there is nothing in the var (vTot_Report_HRs)
>
>Any ideas what I am doing wrong?  I use sum of. in many reports
>and have not had this problem.


John,

You need to initialize all variables, if defined.

Try the following and see what you get.

At the R> prompt or in a command file:

-- Option 1:
CLEAR VAR vTot_Report_HRs,vOtherRptVariable1, vOtherRptVariable2, +
vOtherRptVariable3
SET VAR vTot_Report_HRs datatype = 0
SET VAR vOtherRptVariable1 datatype = NULL
SET VAR vOtherRptVariable2 datatype = NULL
SET VAR vOtherRptVariable3 datatype = NULL
CLS
PRINT reportname WHERE ... OPTION SCREEN|WINDOW_STATE MAXIMIZED
CLEAR VAR vTot_Report_HRs,vOtherRptVariable1, vOtherRptVariable2, +
vOtherRptVariable3
RETURN

-- Option 2:
CLEAR VAR vTot_Report_HRs,vOtherRptVariable1, vOtherRptVariable2, +
vOtherRptVariable3
SET VAR vTot_Report_HRs datatype = NULL
SET VAR vOtherRptVariable1 datatype = NULL
SET VAR vOtherRptVariable2 datatype = NULL
SET VAR vOtherRptVariable3 datatype = NULL
SET ZERO ON
CLS
PRINT reportname WHERE ... OPTION SCREEN|WINDOW_STATE MAXIMIZED
CLEAR VAR vTot_Report_HRs,vOtherRptVariable1, vOtherRptVariable2, +
vOtherRptVariable3
RETURN

For a sample report and command file, take a look at the
SubTotalsAndTotals report and Reports13_SubTotalsAndTotals.rmd
command file included with the ConComp database.

Hope that helps!

Very Best R:egards,

Razzak.

Reply via email to