I hope you use Select Option in your selection screen .
Case 1# If you pass "From and To" then your documents printing successfully.
Case 2# If you pass only From then your document not printing .
Pass both From and To as same document number and check document is printed
successfully or Not .
Example :
Regard's
Smruti