Bring sugar and water to a boil; add cranberries, and cook until skins pop. Toss apples in lemon juice and place into a 9-inch pie pan. Pour cranberry mixture over apples. Mix oats, brown sugar, butter, and flour, and sprinkle over fruit. Bake at 350 degrees F for 35 to 40 minutes.