@cody actually i was searching for tutorials on jasper reports but could not found a correct tutorial,
My requirment is to print a bill when a button is pressed, when press the button the bill number will be get to a string and get the details and pass it to jasper and print a bill