Walgreen (WAG) said Thursday its same-store sales climbed 7.5% in June, citing strength in the pharmacy segment.

The nation’s largest drugstore recently reported better earnings for the third quarter amid higher sales of prescription drugs. However, the results missed expectations as a less pronounced shift to generic drugs hurt margins.

Drug retailers have been faced with lower drug sales with more generics hitting the market. Generic drugs are typically cheaper than brand-name products, although they also bring higher margins.

Deerfield, Ill.-based Walgreen booked overall sales of $6.28 billion last month, up 8.9% over the year-ago month. Same-store sales in the pharmacy section were up 11.3%, and prescriptions filled grew 7.3%. Pharmacy sales generated 65.2% of total revenue in June.

At the front of the store, same-store sales ticked 1.3% higher. Comparable traffic fell 2%, while basket size improved 3.3%.

Shares of Walgreen were trading 1.3% higher at $74.02.

Follow Matthew Rocco on Twitter @MatthewRocco