This paper proposes a robust parametric programming (RPP) method to adaptively obtain piecewise linear control functions of photovoltaic (PV) inverters for real-time voltage regulation in distribution systems. First, the voltage regulation problem is designed as a multi-parameter programming problem, which is transformed into single-parameter linear programming (sp-LP) problems for realizing local control of a PV inverter while considering the maximum voltage deviation caused by other PV units. Second, an alternating iterative algorithm is developed to solve the sp-LP problem of each PV unit and obtain the control functions of all the PV units. Third, considering the information on PV power correlation, a two-level parametric programming problem is established to enhance the voltage regulation performance of PV inverters. A geometric method is developed to solve the inner-level problem, and breakpoint reduction with robust interpolation is developed to improve the computational efficiency in solving the outer-level problem. Four distribution systems integrated with PV units are used to validate the effectiveness of the proposed method. Numerical results show that the performance of the proposed PV inverter control strategy is close to that of the ideal optimal solution and superior to existing piecewise linear control strategies.