State tax filing

So looking at this again, do I only report to Illinois the basis amount on the 1099-Q as that would be the amount that I would of taken the deduction on not the earnings? The earnings amount is included in the adjusted gross income that carries over from the IRS 1040?