Gartner Inc. reported a 29 percent gain in its second-quarter profit Friday, topping Wall Street expectations, as higher revenue in several of its business units helped the technology research firm.

The quarterly profit beat market expectations, and its shares rose.

Gartner said that it earned $41.5 million, or 43 cents per share, for the quarter that ended June 30. That's up from $32.2 million, or 32 cents per share, in the same quarter last year.

Its revenue increased 9 percent to $397.5 million.

Gartner said revenue in its research business jumped 11 percent to $278.3 million, and events revenue increased 13 percent to $42.5 million. Its consulting business revenue fell 2 percent to $76.7 million.

After adjusting for acquisition related-issues, it earned 45 cents per share, compared with 34 cents last year. Analysts polled by FactSet had expected the company's adjusted earnings would come in at 41 cents per share on revenue of $401 million.

The company reiterated its full-year forecast. It expects to earn $1.63 to $1.79 per share on revenue between $1.60 billion and $1.65 billion. Analysts had forecast annual earnings of $1.71 per share on revenue of $1.62 billion.

Gartner's shares jumped $2.26, more than 5 percent, to $46.80 in early afternoon trading.