06-09-2015 11:51 AM
Hi...I am trying to insert a Error Message when a dataset has no records. I am creating a pdf file and would like to be able to format the text message so that it is left justified and continues onto the next line without breaking within a word. For example, right now it end the first line with "Janu" and continues onto the second line with "ary". Would like it to resemble the same format as if it would be typed in a Word document. Any help would be greatly appreciated....Thanks.
IF &nobs = 0 THEN DO;
PUT "A query for the Purchase History for Client, John Smith, for the period of January 1, 2014 to December 31, 2014 has revealed that no purchases have been made for this client during this time period.";
06-09-2015 12:04 PM
With Put statements you need to control everything, including line counts and such. You could use multiple Put statements but changes to the output format or document properties may not look very good.
Or try File Print ODS and Put _ods_;
I would be very tempted to see if I could get an ODS Text statement to work.
I don't use PDF much but with RTF this would work.
ods text="A query for the Purchase History for Client, John Smith, for the period of January
1, 2014 to December 31, 2014 has revealed that no purchases have been made for this
client during this time period.";
Would work. For readability in a code editor I would break the line at which point you want a blank space at the beginning of each line for the ODS processor to put a space in the right spot. Also you may get a message about "current quote exceeds ..."