Depending on what language you are coding in:
----------
C#:
----------
if(Convert.ToInt32(thisXDocument.DOM.selectSingleNode("/my:FullXPath/my:WeekTotal").text) <= 35)
thisXDocument.PrintOut();
----------
JScript:
----------
if(parseInt(XDocument.DOM.selectSingleNode("/my:FullXPath/my:WeekTotal").text) <= 35)
XDocument.PrintOut();
Also keep in mind that using PrintOut() requires your form to be set to Full Trust security.
Greg Collins [InfoPath MVP]
InfoPath Dev