Earnings reports and a potential megamerger in tech drove stocks higher on Friday, with the Dow Jones Industrial Average (DJINDICES: ^DJI) and the S&P 500 (SNPINDEX: ^GSPC) both closing at new records. Today's stock market Index Percentage Change Point Change Dow 0.10% 22.93 S&P 500 0.31% 7.99 Data source: Yahoo! Finance. News of a possible buyout of Qualcomm by Broadcom added to positive earnings reports to propel tech stocks upward; the Technology Select Sector SPDR ETF (NYSEMKT: XLK) rose 0.81%. Health care stocks were also strong, with the Health Care Select Sector SPDR ETF (NYSEMKT: XLV) rising 0.79%. As for individual stocks, Apple (NASDAQ: AAPL) rose on an excellent quarterly report, while Pandora Media (NYSE: P) tanked on its third-quarter results and outlook. Image source: Getty Images. Apple reports rising sales across all product lines Tech industry observers had been anticipating Apple's fiscal fourth-quarter report for weeks, hoping to get a read on demand for its new iPhone lineup. When the big reveal came Thursday, analysts were surprised to see strength across the board as the tech giant delivered a blowout quarter; shares closed up 2.6% Friday at an all-time high. Revenue grew 12.2% to $52.6 billion, well above the 8.2% increase analysts were expecting and above the guidance range the company provided last quarter. Earnings per share rose 25% to $2.07, when analysts were expecting $1.87. Gross margin was near the top end of guidance at 37.9% Unit shipments of the iPhone increased 2.6% year over year, which was a good result considering iPhone X hadn't started shipping yet. But sales in other product lines boomed. iPad revenue grew 14% and Mac sales gained 25%. The highly profitable services segment grew sales 34% to $8.5 billion, and sales in the "other products" category, which includes the Apple Watch and Apple TV, grew 36%. In the conference call, CEO Tim Cook highlighted his company's strength in China. He stated that Apple increased market share in that country for iPhone, Mac, and iPad, and had double-digit percentage unit growth in phones. Guidance for the current quarter is for sales between $84 billion and $87 billion, a 7% increase at the midpoint from Apple's record quarter last year. Excellent results and an upbeat outlook for next quarter -- and for iPhone X sales -- had investors cheering today. Patience is running thin for Pandora Media Pandora opened the box on its last quarter, and the market didn't like what came out, sending shares crashing 25%. Revenue increased 8% to $379 million, slightly below the $381 million Wall Street was looking for. It also posted a non-GAAP net loss of $0.06 per share, a slight improvement over the $0.07 per share loss a year ago. The company's advertising business was weak, with revenue growing only 1% year over year to $276 million, and declining from the previous quarter. The average price per ad was up, but there was a drop off in the number of ads sold. The number of active listeners declined 5.4%, listener hours fell 4.6%, and the company's share of the U.S. radio market dropped from 9.72% to 9.41%. On the positive side, paid subscribers increased 29% and subscription revenue grew 50% to $84.4 million. In the conference call, management acknowledged that part of the disappointing ad business performance was due to deficiencies in Pandora's technology, meaning that additional investments will be needed in that area. The company also gave Q4 revenue guidance of $365 million to $380 million, substantially below the $413 million that analysts were expecting. Pandora's new CEO, Sling founder Roger Lynch, no doubt was being cautious about setting expectations as he sets to work on getting the company on the path toward long-awaited profitability. But investor patience for the music streaming leader is definitely wearing thin. Offer from The Motley Fool: The 10 best stocks to buy now Motley Fool co-founders Tom and David Gardner have spent more than a decade beating the market. In fact, the newsletter they run, Motley Fool Stock Advisor, has tripled the S&P 500!* Tom and David just revealed their ten top stock picks for investors to buy right now. Click here to get access to the full list! *Stock Advisor returns as of October 9, 2017Jim Crumly owns shares of Apple. The Motley Fool owns shares of and recommends Apple and Pandora Media. The Motley Fool owns shares of Qualcomm and has the following options: long January 2020 $150 calls on Apple and short January 2020 $155 calls on Apple. The Motley Fool recommends Broadcom Ltd. The Motley Fool has a disclosure policy.