The heliospheric magnetic field (HMF) is structured into large sectors of positive and negative polarity. The parts of the boundary between these sectors where the change in polarity matches that of the leading-to-following sunspot polarity in that solar hemisphere, are called Hale Sector Boundaries (HSB). We investigate the flare occurrence rate near HSBs and the association between HSBs and active longitudes. Previous work determined the times HSBs were at solar central meridian, using the detection of the HMF sector boundary crossing at the Earth. In addition to this, we use a new approach which finds the HSB locations at all times by determining them from Potential Field Source Surface (PFSS) extrapolations of photospheric magnetograms. We use the RHESSI X-ray flare list for comparison to the HSB as it provides accurate flare locations over 14 years, from February 2002 to February 2016, covering both Cycles 23 and 24. For the active longitude positions we use previously published work based on sunspot observations. We find that the two methods of determining the HSB generally agree and that 41% (Cycle 23) and 47% (Cycle 24) of RHESSI flares occur within \(30^\circ\) of the PFSS determined-HSB. The behaviour of the HSBs varies over the two Cycles studied, and as expected they swap in hemisphere as the Cycles change. The HSBs and active longitudes do overlap but not consistently. They often move at different rates relative to each other (and the Carrington solar rotation rate) and these vary over each Cycle. The HSBs provide a useful additional activity indicator, particularly during periods when active longitudes are difficult to determine.