Print text within pair of double quotes in ods pdf text within macro

Accepted Solution Solved
Reply
Contributor
Posts: 40
Accepted Solution

Print text within pair of double quotes in ods pdf text within macro

Hello, 

I am having difficulty getting a pair of double quotes to display when using an ods pdf text statement within a macro I have created.

 

I would like to display the following exactly as-is on the report I am creating: 
Something not in quotes "Something in quotes"

 

Here is what I am starting with:

ods escapechar = "^"; 

ods pdf text="^{style [just=c font_size=8 pt] Something not in quotes Something in quotes ).}";

 

I have tried adding quote, bquote, nrstr, str, superq - all to no avail.  Any suggestions would be greatly appreciated.

 

Thank you,

KelseyB

 

 

 


Accepted Solutions
Solution
‎11-18-2015 01:16 PM
Super User
Posts: 11,343

Re: Print text within pair of double quotes in ods pdf text within macro

Have you tried:

 

ods pdf text="^{style [just=c font_size=8 pt] Something not in quotes ""Something in quotes"" ).}";

View solution in original post


All Replies
Solution
‎11-18-2015 01:16 PM
Super User
Posts: 11,343

Re: Print text within pair of double quotes in ods pdf text within macro

Have you tried:

 

ods pdf text="^{style [just=c font_size=8 pt] Something not in quotes ""Something in quotes"" ).}";

Contributor
Posts: 40

Re: Print text within pair of double quotes in ods pdf text within macro

Thank you ballardw.  That worked!  I didn't even think of that.

Super User
Posts: 11,343

Re: Print text within pair of double quotes in ods pdf text within macro

An example of a somewhat very old school practice. I'm sure there are others such as Unicode that would yield prettier output.
Contributor
Posts: 40

Re: Print text within pair of double quotes in ods pdf text within macro

Well it worked.  That is all that matters!

Super User
Super User
Posts: 7,042

Re: Print text within pair of double quotes in ods pdf text within macro

The QUOTE() function is also useful, especially when referencing macro variable values.

 

%let mytext=Something not in quotes "Something in quotes";
ods escapechar = "^"; 
ods pdf text=%sysfunc(quote(^{style [just=c font_size=8 pt] &mytext })) ;
 
Contributor
Posts: 40

Re: Print text within pair of double quotes in ods pdf text within macro

Tom, I will have to try your method to see how it works.  Thank you

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 350 views
  • 0 likes
  • 3 in conversation