|
-
Sep 22nd, 2006, 04:20 AM
#1
Thread Starter
Lively Member
[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
-
Sep 22nd, 2006, 04:45 AM
#2
Lively Member
Re: data report + sql statement
 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?
-
Sep 22nd, 2006, 04:54 AM
#3
Thread Starter
Lively Member
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
-
Sep 22nd, 2006, 05:02 AM
#4
Lively Member
Re: data report + sql statement
-
Sep 22nd, 2006, 05:33 AM
#5
Thread Starter
Lively Member
Re: data report + sql statement
there's no error! it just disregard the concatenation that i made
-
Sep 22nd, 2006, 05:59 AM
#6
Lively Member
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.
-
Sep 22nd, 2006, 06:15 AM
#7
Thread Starter
Lively Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|