In a large saucepan, combine sugar and flour. Stir in water until blended; bring to a boil. Add cranberries and raisins. Reduce heat; cover and simmer for 15 minute, stirring occasionally. Remove from the heat; stir in butter and vanilla until butter is melted. Cool slightly.
Line a 9-in. pie plate with bottom pastry; trim to 1 in. beyond edge of pie plate. Pour filling into crust. Roll out remaining pastry; cut into lattice strips and place over filling. Seal and flute edges. Brush lattice crust with cream if desired.
Bake at 375° for 30 minutes or until crust is golden brown and filling is bubbly, covering edges with foil during the last 10 minutes. Cool on a wire rack. Refrigerate leftovers.