Oracle Corp.'s (ORCL) fiscal fourth-quarter profit declined 7.2%, its first revenue decline in seven years, as the stronger dollar and continuing economic weakness weighed on revenues and earnings.

But stronger-than-expected new license sales and continuing cost management helped the company beat Wall Street expectations, giving some comfort that the company is weathering the storm. On a conference call with investors Tuesday, Oracle executives presented a more upbeat picture of the economy, saying their business pipeline is improving.

Shares were up 2.7% at $20.40 in recent after-hours trading, reflecting broad comfort that the company is managing well through the downturn. Oracle's stock has been rebounding since hitting a three-year low in March.

The Redwood City, Calif.-based database and business software giant has been hurt by current impacts over the past three quarters, and a decline in revenue in the latest quarter highlights how tech companies are still facing a difficult economic climate.

Oracle, which has spent roughly $30 billion on acquisitions in the past four years to boost its portfolio of products, made a surprise bid for Sun Microsystems Corp. (JAVA) in April, which brings it into the technology hardware sector for the first time in a significant way. Oracle has a strong track record with acquisitions, which have added to both top-line and earnings growth.

For the quarter ended May 31, Oracle reported earnings of $1.89 billion, or 38 cents a share, down from $2.04 billion, or 39 cents a share, a year earlier. The stronger dollar reduced earnings by 5 cents a share in the latest quarter.

Excluding stock-based compensation, restructuring and acquisition-related costs, earnings fell to 46 cents a share from 47 cents. Assuming fixed exchange rates, the latest figure would have been 51 cents.

Revenue fell 5% to $6.86 billion, but would have risen 4% if currency rates were constant. Software revenue dropped 3% and services revenue slid 16%. At fixed exchange rates, software revenue rose 6%, while services revenue fell 7%.

Analysts were expecting earnings, excluding stock-based compensation, restructuring and acquisition costs, of 44 cents, on revenues of $6.47 billion, according to a Thomson Reuters survey.

In March, the company said it expected earnings of 42 cents to 46 cents a share on a 10%-to-14% drop in revenue, assuming the currency exchange rates at the time of the projection.

Operating margins, meanwhile, rose to 42% from 40.8%.

New license revenue, a key measure of software growth, dropped 13% to $2.7 billion, and fell 4% assuming exchange rates held steady. In March, Oracle had predicted a 5%-to-15% decline at constant currency rates.

Analysts were expecting new software license revenues of around $2.5 billion, according to a survey by Thomson Reuters.

On an investor call, Oracle said it expected total revenues for the first quarter, on a GAAP basis, to grow by between 1% and 4% on a constant currency basis, or to shrink by between 4% and 1% assuming current exchange rates. On a non-GAAP basis, the company expects revenues to be between flat and 2% on a constant currency basis, or to shrink by between 5% and 3% at current rates.

Earnings per share, on a GAAP basis, are expected to be between 23 cents and 24 cents on a constant currency basis, or between 21 cents and 22 cents at current rates.

- By John Kell, Dow Jones Newswires; 201-938-5285; john.kell@dowjones.com

- By Jessica Hodgson, Dow Jones Newswires; 415-439-6455; jessica.hodgson@dowjones.com