Continue work with database. Relations are problem.

Also add report dialog