We prove necessary optimality conditions of Euler-Lagrange type for generalized problems of the calculus of variations on time scales with a Lagrangian depending not only on the independent variable, an unknown function and its delta derivative, but also on a delta indefinite integral that depends on the unknown function. Such kind of variational problems were considered by Euler himself and have been recently investigated in [Methods Appl. Anal. 15 (2008), no. 4, 427-435]. Our results not only provide a generalization to previous results, but also give some other interesting optimality conditions as special cases.