Data View Web Part Problems

Unable
to display this Web Part. To troubleshoot the problem, open this Web
page in a Windows SharePoint Services-compatible HTML editor such as
Microsoft Office SharePoint Designer. If the problem persists, contact
your Web server administrator.

This problem occurs if the site is saved as the template and restored onto another server.

The resolution is given here, I wont repeat to avoid unnecessary redundancy
https://suguk.org/forums/thread/3001.aspx

But in brief, therotically solution is

we have to add curly braces to the list ID

We
have to do this before saving the site as site template. There are some
five occurences of the site ID which we need to change, we just have to
add curly braces to the listID then only designer generates the new
list IDs for these webparts.