This is driving me crazy!!

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

HI,

I'm trying to print a report based on "Canisters". I have several of
these canisters: A,B, C,...Z, 2A, 2B,2C,...2Z.
I have them grouped by these canisters and ascending sorted. Problem
is, of course that the 2A, 2B etc come before the A, B etc. I created a
group called =Val([Canister]) to sort them properly. But now I get a
"Data Type mismatch in my criteria". What am I doing wrong or is there
a better way to sort than with the Val function?

Thanks everyone,

Dave
 
Excellent. Thank you, it works!!

Ken said:
Dave:

You'll need 2 group levels in the report. The Val function is fine for the
first, so base the report of a query which includes a computed column such as:

SELECT *, VAL(Canister) As OuterGroup
FROM Canisters
WHERE <some criteria>;

Use the OuterGroup column as the first group level and Canister as the
second. Don't give the first a group header or footer, its merely there to
impose an outer grouping. The second can have a group header and/or footer
if required.

Don't include an ORDER BY clause in the query BTW; use the report's internal
sorting and grouping mechanism.

Ken Sheridan
Stafford, England

Dave said:
HI,

I'm trying to print a report based on "Canisters". I have several of
these canisters: A,B, C,...Z, 2A, 2B,2C,...2Z.
I have them grouped by these canisters and ascending sorted. Problem
is, of course that the 2A, 2B etc come before the A, B etc. I created a
group called =Val([Canister]) to sort them properly. But now I get a
"Data Type mismatch in my criteria". What am I doing wrong or is there
a better way to sort than with the Val function?

Thanks everyone,

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top