Ask Your Question

Base Query Char(13) doesn't work [closed]

asked 2017-08-09 19:21:55 +0100

Joe Castor gravatar image

I'm trying to produce a query and report that will list name and address as if on a label. I'm referencing the User Guide "Database Tasks", page 26. All I get is just a long column with everything that was concatenated plus the Char(13)s' as the column name. My example has 3 records that match the criteria. On the query, it lists the three records horizontally. On the report, no data is shown, only the header (I changed the column name "Address" from the very long name. Did I skip a page in the book? Am I expecting the Char(13) to do something it isn't intended to do? My expectations all came from the page 26 example. Attached is the query and report (not cleaned up). Thanks in advanceC:\fakepath\SAS Member Master - Test.odb

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Joe Castor
close date 2017-08-10 18:47:31.423232

1 Answer

Sort by » oldest newest most voted

answered 2017-08-09 19:54:47 +0100

Ratslinger gravatar image

updated 2017-08-10 02:11:57 +0100

Could not even open the report provided but the Query worked fine. Used the query to create simple report which listed three records. Each record printed as:

City, State Zip

Query seems fine. Only added alias as none was there (not really needed).


Re-downloaded your file & this time I could open the report. Discovered two items. Resize the field for the data - more narrow & taller to fit the linefeeds. Also Report Builder does NOT like the LONG field name. No data printed when used. Changed SQL to rename it as LABEL, edited the source name in the report & all worked. Here is the SQL statement I used:

SELECT "MemberID" ||CHAR(13) || "FirstName" || ' ' || "LastName" ||CHAR(13) || "Address" ||CHAR(13) || "City" || '  ' || "StateOrProvince" || '  ' || "PostalCode" AS "LABEL"
FROM "MemberMaster"
WHERE "NwsltrByMail" = TRUE
AND   "NotActive" <> 1
ORDER BY "LastName" ASC,
         "FirstName" ASC
edit flag offensive delete link more


Thank you again reshaping my expectations. I thought the query would react to the Char(13) but, no, only in the report. The report works following your direction. Now I can move to my real project, making a member directory. Lot of things to experiment with now. Thanks again.

Joe Castor gravatar imageJoe Castor ( 2017-08-10 13:47:31 +0100 )edit

Question Tools

1 follower


Asked: 2017-08-09 19:21:55 +0100

Seen: 70 times

Last updated: Aug 10 '17