On Thursday, Rite Aid (RAD -31.13%) will release its quarterly report. Shareholders remain encouraged by the huge gains the stock has made over the past year. Despite skepticism among those who believed that the drugstore chain could never compete effectively against Walgreen (WBA 0.57%) and CVS Caremark (CVS -0.22%), Rite Aid has made substantial progress in making itself a viable long-term player in the industry.

For years, many investors believed that Rite Aid wouldn't be able to survive, with substantial amounts of debt and a smaller network of stores than CVS Caremark or Walgreen. But the underdog drugstore chain has aggressively moved forward with efforts to boost its margins and improve its image, and profitable results for two straight years have defied naysayers and convinced many that Rite Aid's turnaround story is real. Let's take an early look at what's been happening with Rite Aid over the past quarter and what we're likely to see in its report.

Stats on Rite Aid

Analyst EPS Estimate

$0.05

Change From Year-Ago EPS

(44%)

Revenue Estimate

$6.43 billion

Change From Year-Ago Revenue

2.2%

Earnings Beats in Past 4 Quarters

2

Source: Yahoo! Finance.

How far can Rite Aid earnings climb?
In recent months investors have had mixed views on Rite Aid earnings, cutting their May-quarter estimates by $0.03 per share but boosting their fiscal 2016 projections by about 4%. The stock has reflected overall enthusiasm for the company, though, gaining another 7% since mid-March.

Rite Aid's fiscal fourth-quarter results in April showed investors just how far the company has come. Profits were much higher than expected, with same-store sales gains of 2.1% resulting from a 3.5% boost in pharmacy comps. In addition, projections for the full fiscal year look promising, with comps expected to rise between 2.5% and 4.5% and large gains seen for adjusted operating earnings as well.

Source: Rite Aid.

Yet just earlier this month, Rite Aid gave investors pause about how much further it could climb. The company said May same-store sales rose 3.5%, but it cut its profit expectations because of higher drug costs. Even though the reduction in full-year guidance was just $0.01 to $0.02 per share, Rite Aid stock plunged in response as some momentum investors saw a chance that the good times were coming to an end.

Still, Rite Aid's recovery has been impressive because of the scope of improvements the company has made. Even as Walgreen has managed to win some of its customers back from Rite Aid after a pharmacy-benefit dispute forced many Walgreen customers to defect to Rite Aid and CVS, Rite Aid has benefited greatly from the rise of generic drugs and the higher margins they give its pharmacy business. With a recent deal to get all of its generic drugs from a single source, Rite Aid should see even greater efficiency improvements, with less need to stock substantial drug inventories, freeing up working capital for other uses.

Now, Rite Aid is moving toward fostering its own growth. In April, Rite Aid announced it would purchase Texas-area clinic operator RediClinic, furthering the drugstore chain's efforts to broaden its mission to incorporate more aspects of health care and answering similar moves from Walgreen and CVS Caremark on the clinic front. In addition, store remodeling efforts to recast its drugstores as wellness-oriented stores has allowed Rite Aid to expand into other product lines, ranging from fitness apparel and equipment to specialized nutritional products and foods. Rite Aid's loyalty program has also been a source of growth, with much better rewards than CVS and Walgreen offer, helping to encourage long-term patronage among customers.

In the Rite Aid earnings report, watch to see how well the company is doing at making its store-format transition and taking advantage of the opportunities in its clinic business. With strong competition from CVS Caremark and Walgreen and so much up in the air on the health-care front, Rite Aid has a chance to set trends that could take it forward for years into the future.

Click here to add Rite Aid to My Watchlist, which can find all of our Foolish analysis on it and all your other stocks.