This was obviously posted a while ago, answering may help others though so:
Begin by constructing a cylindrical Gaussian surface of radius r and length l around the cylinder. Then the electric field outside of the cylinder is, by Gauss's law:
[itex]\oint[/itex]E.da = Q / ε0 where Q is the total ENCLOSED charge.
The da on the left hand side refers to the area that the electric field passes through the Gaussian surface, not of the cylinder itself:
E x 2∏rl = Q/ε0
Now, the Q enclosed is the volume charge density multiplied by the volume in which Q is contained (i.e. the volume of the cylinder):
Q = ρ x ∏R^2 x l (R - the radius of the CYLINDER not the Gaussian surface is used)
Substitute back in:
E x 2∏rl = ρ x ∏ R^2 x l / ε0
E = ρ x R^2 / 2rε0
Then substitute ρ = 3r^2:
E = 3rR^2/2ε0 (outside; r>R)
For inside the enclosed charge has "the same r":
E x 2∏rl = ρl∏r^2 / ε0
E = ρr / 2ε0
Substitute ρ:
E = 3r^3 / 2ε0 (inside; for r < R)