No Summary Options

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a report using wizard. I dont see the button for
'Summary Options'. I was reading another post and I understand that the
fields wanted to be summarised have to be numeric. I learnt Access 2000 first
and I dont think that was a restriction there. I have Access 2003 now. My
report is based off a query. Moreover the fields that I would like to
summarize look numeric. For example, one of them is 'Number of Orders' which
was derived by using count function.
How can I make the 'Summary Options' appear?
 
Are any of the values in the query right aligned or are they all left
aligned? Left would suggest they are all being treated like text/string
values and not numeric.
 
They are left aligned. How can I do it?

Duane Hookom said:
Are any of the values in the query right aligned or are they all left
aligned? Left would suggest they are all being treated like text/string
values and not numeric.
 
You can determine why they are left aligned? Are they the result of a
calculation? If so, please share the SQL view or calculations. Normally you
can wrap an expression in Val(..your expression..) to convert the variant
string into a numeric value.
 
Wrapping in val() works. There are 4 fields that I would like to summaize. I
was able to val() 2 of these but not the percentage fields:

No of Orders: Val(IIf(IsNull([Number of Orders]),"0",[Number of Orders]))
No of NonDiscounted orders: Val(IIf(IsNull([No of non-discounted
orders]),"0",[No of non-discounted orders]))
Percent Non-Discounted: IIf([No of orders]>0,Format([No of NonDiscounted
orders]/[No of Orders],"Percent"),"N/A")
Percent Discounted: IIf([No of orders]>0,Format(([No of orders]-[No of
NonDiscounted orders])/[No of Orders],"Percent"),"N/A")
How can do the last 2 fieds
 
Your issue is an IIf() that returns either a numeric value or a string. "0"
is a string. Why do you want to return a string for No of Orders? Consider a
first expression like:
No of Orders: Nz([Number of Orders],0)
or
No of Orders: Val(Nz([Number of Orders],0))

You should be able to do the same with nondisc...

Also, don't format and don't return "N/A" in a query. Formatting should be
done in your report controls, not in the query.
Percent Non-Discounted: IIf([No of orders]>0,[No of NonDiscounted
orders]/[No of Orders],0)

You still may need to wrap these in Val().
--
Duane Hookom
MS Access MVP
--

neeraj said:
Wrapping in val() works. There are 4 fields that I would like to summaize.
I
was able to val() 2 of these but not the percentage fields:

No of Orders: Val(IIf(IsNull([Number of Orders]),"0",[Number of Orders]))
No of NonDiscounted orders: Val(IIf(IsNull([No of non-discounted
orders]),"0",[No of non-discounted orders]))
Percent Non-Discounted: IIf([No of orders]>0,Format([No of NonDiscounted
orders]/[No of Orders],"Percent"),"N/A")
Percent Discounted: IIf([No of orders]>0,Format(([No of orders]-[No of
NonDiscounted orders])/[No of Orders],"Percent"),"N/A")
How can do the last 2 fieds


Duane Hookom said:
You can determine why they are left aligned? Are they the result of a
calculation? If so, please share the SQL view or calculations. Normally
you
can wrap an expression in Val(..your expression..) to convert the variant
string into a numeric value.
 
Back
Top