Try this...........

-- Need to input 'AUDIT ALL' command for this to work

col database NEW_VALUE _database
set termout off
set echo off
select name database from v$database;
set sqlp ''
@DATE
set termout on
col logoff format a19
col logon_time format a18

-- break on user_name
ttitle 'Oracle (' _database ') last 90 days database usage as at ' _date skip 2
select i.real_name,
to_char(timestamp, 'DD MON YYYY hh24:mi') logon_time,
to_char(logoff_time,'DD MON YYYY hh24:mi') logoff
from dba_audit_session d,
intravue_system.intravue_users i
where d.username like ('%_%')
AND (timestamp > (sysdate - 90))
and i.username = d.username
order by logon_time,d.username,timestamp,logoff_time;
ttitle off