Make it two in a row.

Rite Aid Corporation (RAD 5.26%) missed the mark with its first-quarter earnings results announced in June, sending shares downward. This morning, the large pharmacy retailer disappointed investors yet again with its second-quarter earnings announcement. Shares were down around 7% in pre-market trading. The quarterly results weren't the culprit, though.

Source: FoolEditorial on Flickr

Good news 

Actually, there was plenty of good news. Rite Aid reported revenue for the quarter of $6.5 billion. That beat the consensus analyst projection of $6.48 billion and reflected a year-over-year increase of 3.9%. 

Same store sales emerged as the hero behind these positive results, increasing 4.1% compared to the prior year. Front-end store sales were only 1.1% higher year-over-year, but pharmacy sales jumped a solid 5.6%. Pharmacy sales drove over two-thirds of total drugstore sales for Rite Aid.

Rite Aid also reported earnings for the fiscal second quarter of $127.8 million, or $0.13 per share. Not only was that much better than the $0.03 per share recorded in the same quarter the prior year, it also blew estimates out of the water. Analysts were expecting only $0.06 per share. 

The company's distribution deal with McKesson (MCK -1.35%) made an impact. Rite Aid stated that its transition to the new drug purchasing and delivery arrangement helped improve gross profit through an impact on inventory valuation. Higher gross profit combined with higher overall sales led to better-than-expected earnings. 

Bad news
With solid improvement in both the top line and bottom line, why did investors react so poorly to Rite Aid's financial update? The pharmacy chain cut its full year earnings guidance for fiscal 2015 to $0.22-$0.33 per share. In June, Rite Aid projected full year earnings would come in between $0.30 and $0.40 per share.

Despite the relatively good results in the most recent quarter, Rite Aid expects profit margins to deteriorate. Part of the reason for the gloomy outlook stems from continued reimbursement rate pressure. Another big factor, though, is the anticipated impact of generic drugs.

Rite Aid's earnings announcement said the company expects "lower profitability from new generics and generic drugs that recently lost exclusivity". Compare that statement to what CEO John Standley's comments in June that he expected the second half of fiscal year 2015 to be stronger because of the introduction of new generics. What gives?

It all comes down to the price that Rite Aid pays for generic drugs. Pharmacies typically count on making lower revenue but higher profits from generics than they do for brand drugs. When generic drugs aren't available when expected, it throws profitability projections off.

Looking ahead
The right question for investors to ask about Rite Aid is whether or not the challenges facing the company are long-lasting or temporary. Reimbursement rate pressure seems unlikely to improve. However, the generic drug issues should only be temporary.

Over time, the McKesson distribution arrangement should help Rite Aid beyond simply improving inventory valuation. As John Standley alluded to in his June remarks, the introduction of new generic drugs should make a positive impact on profitability. He's right over the long run.

Rite Aid also stands to benefit from expanded Medicaid enrollment in many states and from continued remodeling of stores to adopt the Wellness concept. I think that these factors provide reason to believe that Rite Aid's current slump won't persist indefinitely. However, based on the company's projections for the rest of fiscal 2015, I wouldn't count on the scenario improving in the short term. Unfortunately, next quarter could make it three in a row.