How many years will a bankruptcy show on my credit report?

The bankruptcy court has no jurisdiction over credit reporting agencies. The Fair Credit Reporting Act is the law that controls credit reporting agencies. See 15 U.S. Code Sections 1681 - 1681u.