Hi!
You have some dialog in your report?
So, you can just access to needed element of diaog
Try do like this
first define the datasource Source
as select * from Table where id=$V{id}
then define in script page some scripts
YourDlg.exec()==1
function beforeDataPrint() {
setVariable("id", YoourDlg.YourLineEdit.Text)
reopenDatasource(Source)
}