Returns a layout related with a specified viewport from the specified database.
If a layout with the specified viewport is not found, a NULL pointer is returned.