[RESOLVED] data report + sql statement
i created a data report. i grouped them by address using the properties of command1 in the data environment (meaning not using sql statement). it runs okay. but when i added sql statement on the properties also of command1, an error appears 'datafield 'command1.lname' not found
SELECT STUD_NO, LNAME +','+ FNAME +' '+ MNAME AS STUD_NAME, ADDRESS, AGE FROM TBLSTUDENT
Re: data report + sql statement
Quote:
Originally Posted by heavenscent29
i created a data report. i grouped them by address using the properties of command1 in the data environment (meaning not using sql statement). it runs okay. but when i added sql statement on the properties also of command1, an error appears 'datafield 'command1.lname' not found
SELECT STUD_NO, LNAME +','+ FNAME +' '+ MNAME AS STUD_NAME, ADDRESS, AGE FROM TBLSTUDENT
In above query u have specified the Column name as STUD_NAME. There is no column in the name lName.
Cud u understand?
Re: data report + sql statement
yah, i undrstand. so, wht will i do? i tried this but the concatenation doesn't work
SELECT STUD_NO, LNAME, FNAME, MNAME, LNAME +','+ FNAME +' '+ MNAME AS STUD_NAME, ADDRESS, AGE FROM TBLSTUDENT
Re: data report + sql statement
Re: data report + sql statement
there's no error! it just disregard the concatenation that i made
Re: data report + sql statement
U have to display concatenated value in the name of ''command1.STUD_NAME'. If it's truncated check with the length of the text box in ur report. In 'command1.lname' it will hold only the last name.
Re: data report + sql statement
now i see the problem. i haven't updated my data report. i haven't deleted the fields for lname, fname and mname and changed to stud_name. tnx a lot 4 helping me!