Walgreen (WBA -0.93%) shares dropped Tuesday after the pharmacy chain's fiscal third-quarter report missed Wall Street's expectations on sales and earnings missed.

However, results were actually pretty good. Sales and earnings both grew in the past year. And given that both Walgreen and Rite Aid (RAD -20.53%) have indicated that health-care reform is supporting prescription volume, investors may want to consider using stock weakness to buy pharmacies this summer.

Source: Walgreen.

Sales continue higher
Walgreen's total sales grew by nearly 6% in the quarter from the same period last year. Sales growth was supported by a 2.2% lift in front-end same-store sales and a 6.3% jump in same-store pharmacy revenue. That's impressive given that the dollar value of branded drugs losing patent protection is higher this year than it was this time last year.

Offsetting generic price headwinds, sales grew thanks in part to insurance enrollment increases driven by the Affordable Care Act.

Newly insured patients covered by private plans and Medicaid expansion increased the number of prescriptions Walgreen filled last quarter by 4.1%, year over year. That outpaced the 2.3% script growth reported by Rite Aid during the three months ending in May.

Source: Walgreen.

Big and getting bigger
Walgreen is the goliath in the pharmacy market. The company opened or acquired a net 39 stores in the quarter, bringing its location count to 8,683 and solidifying its lead as the nation's largest pharmacy operator.

The store growth and solid results in prescription volume at existing stores helped Walgreen boost its market share by 20 basis points in the quarter, to 19%, according to IMS Health.

Prescriptions for patients covered by Medicare Part D jumped more than 11% year over year in the quarter. Given that the number of prescriptions filled annually increases with age, and baby boomers are turning 65 at a rate of 10,000 per day, volume should continue to provide tailwinds over the coming years.

Impacting the bottom line
Similar to Rite Aid, Walgreen blamed its earnings miss partially on lower reimbursements for generic drugs and generic-drug price increases.

As a result, the company's year-over-year cost of sales in the quarter increased by 40 basis points, to 71.9%. That uptick masked the company's cost savings success, which helped reduce selling, general, and administrative expenses from 23.8% of sales a year ago to 23.5%.

Despite higher costs of sales, Walgreen in the quarter generated shareholder-friendly operating cash flow of $1.3 billion.

That consistent cash flow is helping Walgreen continue to invest in growth. The company is renovating stores to its new "Well Experience" format, opening in-store clinics, and rolling out new private label products such as Boots No7.

Source: Walgreen

Those investments should help future earnings grow, suggesting that while Walgreen earnings were light this quarter, headwinds may ease considerably over the coming year.

That could be particularly true given that Walgreen expects to make an investor presentation this summer regarding income-friendly moves tied to its link-up with Alliance Boots. That deal is already providing a better than predicted impact on Walgreen's bottom line, adding $0.15 to earnings per share this past quarter.

Fool-worthy final thoughts
If those reasons aren't intriguing enough to put Walgreen on your watchlist, the company is also improving its balance sheet. In the past year, Walgreen has reduced its long-term debt from $4.5 billion to $3.7 billion. If Walgreen can continue to grow its sales, and generic headwinds on profit ease, a better balance sheet may allow the company to boost its dividend, which makes this investment even more compelling.