The SAS Output Delivery System and reporting techniques

Horizontal Bar In HTML Output

Reply
New Contributor Ivc
New Contributor
Posts: 3

Horizontal Bar In HTML Output

We have several outputs in HTML but we cannot seem get the Horizontal Scroll Bar to show...the horizontal scroll bar shows in the output screen but not the HTML output...any ideas on how get it to work.

Thanks
SAS Super FREQ
Posts: 8,739

Re: Horizontal Bar In HTML Output

When you say "output screen" vs "HTML output" -- do you mean the Results Window viewer for HTML (inside SAS session) vs inside Internet Explorer or Netscape (outside SAS session)?

For either case, can you post an example of your code??? For example:
[pre]
ODS HTML FILE='wombat.html';
proc print data=sashelp.class;
run;
ODS HTML CLOSE;
[/pre]
OR
[pre]
ODS TAGSETS.MSOFFICE2K FILE='wombat_mso.html';
proc print data=sashelp.class;
run;
ODS TAGSETS.MSOFFICE2K CLOSE;
[/pre]

Otherwise, it's hard to envision where you might be having a problem.

cynthia
New Contributor Ivc
New Contributor
Posts: 3

Re: Horizontal Bar In HTML Output

I am speaking within Internet Explorer. I am not the author of the program, here is the script that runs hopefully it is helpful:


data _null_;

%MACRO PORTLIST;
indpct = ind_mktval /net_assets * 100;
asspct = ass_mktval /net_assets * 100;
asothpct = asst_oth /net_assets * 100;
netastpct = net_assets /net_assets * 100;
industrytypenameu = upcase(industrytypename);
amountd = amount;
spdesc1 = trim(spdesc);
by portfolio assclass industrycode;
datetox = input(put(dateto,$8.),yymmdd8.);
matdatex = input(put(matdate,$8.),yymmdd8.);
format mktval epbookval ind_mktval ind_book ass_mktval amount
comma12.0 coupon 5.2 matdatex mmddyy8.
datetox worddate18. indpct asspct asothpct netastpct 4.1 amountd ass_book port_book port_mktval asst_oth net_assets dollar12.0;

if first.portfolio then do;
put @1 '';
put @1 '';
put @1 '';
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '';
put @1 '';
put @1 '';
put @1 '';
put @1 '
';
put @1 companyname ' (' fundname ')

';
put @1 ' PORTFOLIO OF INVESTMENTS IN SECURITIES

';
put @1 '

' DATETOX '

';
put @1 '

';
put @1 '
';
put @1 '

';
/* put @1 '

'; */
put @1 ' ';
end;
if first.assclass and assclass = 3 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

LONG-TERM DEBT SECURITIES:

Rating

 

Rate(%)

 

Maturity

Face Amount($)

 

Value($)

';
end;
if first.assclass and assclass = 2 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

COMMON STOCKS:

 

 

 

 

 

Shares

 

Value($)

';
end;
if first.assclass and assclass = 1 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

INDEXED ASSETS:

 

 

 

 

 

Shares

 

Value($)

';
end;
if first.assclass and assclass = 4 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

SHORT-TERM DEBT SECURITIES:

Rating

 

Rate(%)

 

Maturity

Face Amount($)

 

Value($)

';
end;
if first.assclass and assclass = 1.5 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

INDEXED ASSETS SHORT-TERM DEBT SECURITIES:

Rating

 

Rate(%)

 

Maturity

Face Amount($)

 

Value($)

';
end;
if first.industrycode then do;
/* put @1 '
'; */
put @1 '';
put @1 '';
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '';
put @1 '';
put @1 '';
end;
if assclass = 3 or assclass = 4 or assclass = 1.5 then do;
if last.industrycode then do;
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1' ';
put @1'';
put @1'
';
put @1 '

' industrytypenameu ' (' indpct '%)

     
';
put @1' ' isrname '
';
put @1'

' spdesc1 '

';
put @1'  
';
put @1' ' coupon '
';
put @1'  
';
put @1' ' matdatex '
';
put @1' ' amount '
';
put @1'  
';
put @1' ' mktval '
';
put @1'  
';
put @1'  
';
put @1'  
';
put @1'  
';
put @1'  
';
put @1'  
';
put @1'  
';
put @1'  
';
put @1' ' ind_mktval '
';
end;
else if first.industrycode then do;
put @1' ';
put @1' ';
put @1' ' isrname ' ';
put @1' ';
put @1'

' spdesc1 '

';
put @1' ';
put @1'   ';
put @1' ';
put @1' ' coupon '';
put @1' ';
put @1'   ';
put @1' ';
put @1' ' matdatex '';
put @1' ';
put @1' ' amount '';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' mktval '';
put @1' ';
end;
else do;
put @1' ';
put @1' ';
put @1' ' isrname ' ';
put @1' ';
put @1'

' spdesc1 '

';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' coupon '';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' matdatex '';
put @1' ';
put @1' ' amount '';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' mktval '';
put @1' ';
end;
end;
else do;
if last.industrycode then do;
put @1' ';
put @1' ';
put @1' ' isrname ' ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' amount '';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' mktval '';
put @1' ';
put @1' ';
put @1' ';
put @1'   ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' ind_mktval '';
put @1' ';
put @1'';
put @1'';
end;
else do;
put @1' ';
put @1' ';
put @1' ' isrname ' ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' amount '';
put @1' ';
put @1'  ';
put @1' ';
put @1' ' mktval '';
put @1' ';
end;
end;
if last.assclass and assclass = 3 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

TOTAL LONG-TERM DEBT SECURITIES (Cost: ' ass_book ') ' asspct '%

 

 

' ass_mktval '

';
end;
if last.assclass and assclass = 1 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

TOTAL INDEXED ASSETS (Cost: ' ass_book ') ' asspct '%

 

 

' ass_mktval '

';
end;
if last.assclass and assclass = 2 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

TOTAL EQUITY SECURITIES (Cost: ' ass_book ') ' asspct '%

 

 

' ass_mktval '

';
end;
if last.assclass and assclass = 4 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

TOTAL SHORT-TERM DEBT SECURITIES (Cost: ' ass_book ') ' asspct '%

 

 

' ass_mktval '

';
end;
if last.assclass and assclass = 1.5 then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 '
';
put @1 '

TOTAL SHORT-TERM DEBT SECURITIES (Cost: ' ass_book ') ' asspct '%

 

 

' ass_mktval '

';
end;




if last.portfolio then do;
put @1 '';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1 ' ';
put @1' ';
put @1 ' ';
put @1 '
';
put @1 '

TOTAL INVESTMENTS (Cost: ' PORT_book ') ' asspct '%

 

 ';
put @1 '

' PORT_mktval '

';
put @1 '

OTHER NET ASSETS ' asothpct '%

 

 ';
put @1 '

' ASST_OTH '

';
put @1 '

NET ASSETS ' netastpct '%

 

 ';
put @1 '

' NET_ASSETS '

';

/* put @1''; */
put @1'';
put @1' ';
put @1'

 

';
put @1' ';
put @1'

 

';
put @1' ';
put @1'';
put @1'';
end;
%MEND;

run;
SAS Super FREQ
Posts: 8,739

Re: Horizontal Bar In HTML Output

Hi:
It looks like you have either a SAS Macro coding problem or a DATA _NULL_ programming problem. By default, if you were using ODS, you would ONLY see a horizontal scroll bar in your browser window if the output were wider than your current browser window. For example, with a resolution of 1024 x 768, when I submit this code and view the results in an expanded browser window:
[pre]
ods html file='c:\temp\prdsale.html';
proc print data=sashelp.prdsale;
title '1) should have Horiz. scroll bar';
run;
ods html close;

ods html file='c:\temp\class.html';
proc print data=sashelp.class;
title '2) no Horiz. scroll bar';
run;
ods html close;
[/pre]

I see a horizonal scroll bar for output #1 and do NOT have a horizontal scrollbar for output #2 (because SASHELP.CLASS output from PROC PRINT fits within my expanded browser window -- no horizontal scroll bar is needed.)

However, you do not seem to be using ODS to generate your HTML -- it looks like you are creating HTML within a DATA _NULL_ step. Your best bet for help with this program is to contact Tech Support. To find out how to contact Tech Support, refer to: http://support.sas.com/techsup/contact/index.html

Good luck!
cynthia
New Contributor Ivc
New Contributor
Posts: 3

Re: Horizontal Bar In HTML Output

Okay, thanks Cynthia.
Ask a Question
Discussion stats
  • 4 replies
  • 165 views
  • 0 likes
  • 2 in conversation