Try limiting fetched data as of your requirement.
you can concat your condition in query . So It is easy to debug and see the result fetched then writing formula in report.that is :
MyCommand.CommandText = "Select username,currentdate,loggedin,loggedout from loghistory where username='" + Login.txtuser.Text + "' where loggedin > 'date of shift' and loggedout > 'date of shift ' ....etc order by currentdate desc "
you have so less detail about your logic and error you found ,only code is not enough to fill your actual problem. you should be more descriptive .
Debug and view data fetched in your dataset myDS.
Is myDS have values as of your condition ?
what table actualguesting holds?