A distributed antenna system whose goal is to provide data communication and positioning functionalities to mobile stations (MSs) is studied. Each MS receives data from a number of base stations (BSs) and uses the received signal not only to extract the information but to determine its location as well. This is done based on time-of-arrival or time-difference-of-arrival measurements, depending on the assumed synchronization conditions. The problem of minimizing the overall power expenditure of the BSs under data throughput and localization accuracy requirements is formulated with respect to the beamforming vectors used at the BSs. The analysis covers both frequency-flat and frequency-selective channels and accounts for robustness constraints in the presence of parameter uncertainty as well. The proposed algorithmic solutions are based on rank-relaxation and difference-of-convex programming.