By Eva Dou

BEIJING-- Lenovo Group Ltd. swung to a slim profit in its fiscal second quarter, helped by the sale of an office building, but the electronics maker faced further struggles in its smartphone venture.

Sales declined from the year-earlier period in each of Lenovo's three main business groups: personal computers, mobile devices and data centers.

"The market is not as good as we expected," Chief Executive Yang Yuanqing said on an investor call Thursday.

Lenovo is the world's largest PC maker by shipments, but it has been trying to shift its business toward smartphones and servers, sectors with greater growth potential.It acquired smartphone maker Motorola Mobility and an International Business Machines Corp. server unit in 2014, but has struggled to make them competitive.

Major Chinese smartphone brands such as Oppo Electronics Corp. and Huawei Technologies Co. have made large sales gains this year at the expense of smaller competitors like Motorola Mobility.

Lenovo said its net income for the quarter ended Sept. 30 was $157 million, rebounding from a net loss of $714 million in the year-earlier period and beating analysts' expectations.

Lenovo was helped by a $206 million one-time gain from the sale of an office building in Beijing that it will lease back. Lenovo also sold and leased back an office building in its fiscal first quarter, for a one-time gain of $129 million.

Second-quarter revenue fell to $11.2 billion, from $12.2 billion a year earlier.

Mr. Yang said Lenovo planned to strengthen its sales coverage in the U.S. andWestern Europe to try to bolster its server business, while pursuing "hyperscale" customers -- such as internet companies -- in China.

Although Lenovo's PC market share edged higher in the quarter to 20.9%, its shipments fell due to a continued global market slump, according to market research firm Gartner.

Lenovo also said Thursday that it has completed a new campus in Beijing and has started moving employees into the new facility.

Write to Eva Dou at eva.dou@wsj.com

(END) Dow Jones Newswires

November 03, 2016 07:45 ET (11:45 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.