Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User Input parameter value dont show up when Query returns nothing.

Status
Not open for further replies.

coolkk

Programmer
Jan 7, 2008
6
US
Hi Guys, thanks for earlier response..and one more .i searched lot in Help..didnt find.
Problem:
Report has parameter called "A", user enters some value "X" ,Query returns null(no rows) for "X", So I display message "No data found".
In Report Header i am display all the parameters user entered, telling him for his search "X" this is the result. I used parameter in header.

The problem is whenever query doesnt returns anything Parameter value is gone. When query returns something all values are thr..so everything is fine.

So question is how to retain the value of user entered parameter , why it is gone only when no results.??

I m using start() method of datarow: region is my user entered parameter.

Function Start( ) As Boolean
Start = Super::Start( )
dim strSQL as String
dim Dash_Pos as Integer
dim Pgm_BegVal as String, Pgm_EndVal as String
dim Maj_BegVal as String, Maj_EndVal as String

strSQL = "SELECT BM_ACCT_NUMBER_1"

strSQL = strSQL + ", SUBSTR(BM_ACCT_NUMBER_1,13,1) AS BM_BUD"
.......
.......

strSQL = strSQL + " FROM GSIFMSDATA.BMSET where "

strSQL = strSQL + " INTEGER(SUBSTR(BM_ACCT_NUMBER_1,8,1)) = " & Region & " "

OpenCursor(strSQL)

End Function


Thanks in advance.
KK
 
Did you solve this? is your parameter Global in scope? You should get a value back for it no matter what the query does.

The header does not rely on any onRow or BuildFromRow processing does it, as if you get nothing back in the query you will have no rows!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top