Source: Wikimedia Commons

After reporting revenue and earnings for the third quarter of its 2014 fiscal year on Jun. 24, shares of Walgreen (WBA -0.11%) fell nearly 2%. Despite the fact that management reported top line and bottom line results that fell short of analyst estimates, Mr. Market's decision to send shares of the drugstore chain down modestly suggests that it's still optimistic about the company's prospects. Moving forward, will Walgreen prove that it has what it takes to deliver attractive returns, or will CVS Caremark (CVS -0.17%) or Rite Aid (RAD 25.83%) make better long-term plays?

Walgreen couldn't please analysts
For the quarter, Walgreen reported revenue of $19.4 billion. Although this represents a 6% gain over the $18.3 billion management reported the same quarter a year earlier, it missed the $19.5 billion forecasted by analysts. This growth was due, in part, to a 1.5% rise in drugstore count from 8,097 locations last year to 8,217 this year, but the biggest contributor was the company's comparable store sales, which jumped 4.8%.

In its press release, the company attributed this rise in comparable store sales to a 6.3% jump in comparable store sales in its prescription category, while total prescription sales rose 8.4%. Front-end comparable store sales also increased, up 2.2% year-over-year.

  Actual (adj.) Forecasted (adj.) Last Year's
Revenue $19.4 billion $19.5 billion $18.3 billion
Earnings per Share $0.91 $0.94 $0.85

Source: Yahoo! Finance

From a profitability perspective, Walgreen's results were even better, but the company still fell short. For the quarter, the company reported earnings per share of $0.75, 15% above the $0.65 reported last year. After accounting for various adjustments, such as a change in its LIFO provision and store closure costs, earnings came in at $0.91, 7% above last year's adjusted earnings of $0.85 but shy of the $0.94 Mr. Market anticipated.

In addition to benefiting from a rise in revenue, Walgreen saw its bottom line grow because of reduced costs, primarily in the form of its selling, general and administrative expenses, which fell from 23.8% of sales to 23.5%. These cost improvements were, however, partially offset by rising costs in its cost of goods sold category, which rose from 71.5% of sales to 71.9% as generic drug inflation and fewer brand-to-generic introductions took their toll on profits.

But Walgreen still appears to have the engine for success
Although Walgreen's performance this quarter wasn't superb, the company's strategic advantages appear to be in place better now than ever. In 2012, Walgreen purchased a 45% stake in Alliance Boots for $6.5 billion with the agreement that it could acquire the 55% of the business it doesn't already own during a six-month window in 2015 for $9.5 billion.

After completion of the deal, Walgreen will have a strong footprint in Europe and the consolidated company's revenue is expected to rise from $72.2 billion to $110 billion. While this isn't as high as the $126.8 billion reported by CVS in 2013, it's significantly greater than the $25.5 billion on Rite Aid's financial statements.

Source: Walgreen

Even better than revenue growth is what the acquisition of Alliance Boots will mean for Walgreen's profitability if Walgreen goes for the deal. The tax savings associated with reincorporating to Switzerland where the acquiree is based would be substantial, which would give Walgreen a solid profitability edge over CVS and Rite Aid.

Another good edge that Walgreen has over the competition is its Walgreen Balance Rewards loyalty program. By signing up, customers can receive discounts and other perks that makes shopping at the company as rewarding as possible. As of this past quarter, the company boasted 81 million active members under the program. This is larger than the 70 million members listed on CVS' website for its ExtraCare program and far bigger than the 25 million members who use Rite Aid's wellness+ program.

Foolish takeaway
Based on Walgreen's earnings release, Mr. Market was disappointed but not horrified about the company's results. What this suggests is that the company isn't growing as rapidly as investors might like to see, but the fact that it is growing at all and that it has some things that could play to its advantage in the years to come, means that Mr. Market hasn't lost hope in the pharmacy. Moving forward, there is no guarantee that Walgreen can continue to do well, but given its considerable size and profitability, it makes for an interesting prospect for the Foolish investor to analyze deeper.