Business Objects' (BOBJ) second-quarter earnings fell 66%, but the company's results were better than it and analysts had feared.

Moreover, the company predicted that third-quarter revenue and sales could exceed Wall Street's estimates.

Investors were exuberant at the news. In recent trading after-hours trading, shares of Business Objects were up $3.18, or 15.3%, to $24.

In the just-completed period, the business software maker earned $7.9 million, or 8 cents a share. That was down from the second quarter last year, when the company earned $23.1 million, or 25 cents a share.

Revenue rose 12% year over year to $294.5 million, thanks to a 25% jump in service revenue. But the company's gross and operating margins declined, thanks to rising costs. Administrative expenses and research and development spending both rose by more than 30% from the second quarter last year, while marketing costs rose more than 17%.

Excluding amortization and stock options expenses, Business Objects would have earned $29.1 million, or 31 cents a share, down from $60 million, or 63 cents a share, a year ago.

Still, the company's results were better than the company's guidance and Street estimates. Analysts polled by Thomson First Call were expecting the company to earn 28 cents a share, excluding amortization and stock options costs, on sales of $290.5 million.

Earlier this month, the company warned that it wouldn't meet its previous earnings and revenue targets. The company's updated outlook called for pro forma earnings of 25 cents to 28 cents a share on sales ranging from $287 million to $291 million.

Originally, the company had predicted a profit of 10 cents to 13 cents a share -- 30 cents to 33 cents a share excluding options costs -- on revenue of between $295 million and $300 million.

For the third quarter, Business Objects expects to earn 15 cents to 18 cents a share, or 32 cents to 35 cents a share sans items, on sales ranging from $293 million to $298 million.

On the midpoints, that forecast tops the consensus view going into the report. The Street had previously predicted that the company would earn 32 cents a share, excluding charges, on $293.1 million in sales in current period. In the third quarter last year, Business Objects earned $19.6 million, or 21 cents a share, on revenue of $261.4 million.

The company's stock closed regular trading on Wednesday up 83 cents, or 4.2%, to $20.82.

More from Technology

Experts Break Down GDPR Risks for Investors

Experts Break Down GDPR Risks for Investors

Netflix Ready to Surpass Disney as America's Most Valuable Media Company

Netflix Ready to Surpass Disney as America's Most Valuable Media Company

60 Seconds: What the Heck is GDPR?

60 Seconds: What the Heck is GDPR?

Musk's Tweets About Unions Draw Fire From United Auto Workers

Musk's Tweets About Unions Draw Fire From United Auto Workers

PayPal Wants to Consolidate the World of Rewards Points

PayPal Wants to Consolidate the World of Rewards Points