In VA I created a 100% stacked bar chart with labels per segment. The percentage value is shown with 2 decimals. How can this be changed to 1 decimal? Aantal is the measured variable (Frequencypercentage cannot be used here.) Thanks for suggestions. Jurgen
... View more
Hi, I have been working on a SAS VA report with a custom graph. Printing the report with the standard functionality "PDF Export" works but delivers terrible output. So I took the challenge to generate the pdf in a job (Job Execution) where I receive parameters from the report itself, subset the data and create a nice pdf-file, ready to be downloaded with a click. This all works. The only thing missing is an image of the custom graph. So I have been studying the REST API's, very interesting. I am now able to generate an image of the graph but that's where it ends, and that's where my question starts.. This is a snippet of the code I use to create a job to capture an image of my custom graph. filename jobresp temp;
proc http
method=POST
url="&BASE_URI./reportImages/jobs"
oauth_bearer=sas_services
in="{
""version"":3,
""reportUri"": ""&report_uri"",
""layoutType"": ""normal"",
""selectionType"": ""visualElements"",
""visualElementNames"": ""ve22789"",
""imageType"":""png"",
""size"": ""1200x800"",
""refresh"": true
}"
out=jobresp;
headers
"Accept"="application/vnd.sas.report.images.job+json"
"Content-Type"="application/vnd.sas.report.images.job.request+json";
debug RESPONSE_BODY OUTPUT_TEXT;
run; After submitting the job I'm able to get the image with this code: filename rsvg temp;
proc http
method=GET
url="&BASE_URI./%trim(&image_uri)"
out=rsvg
oauth_bearer=sas_services;
headers
"Accept"="image/svg+xml";
run; This all works. An svg-file is generated and I can view it in the browser but the image is not added in my pdf. This is where my questions begin: The filename reference is to a temp-file. I don't know how to reference this filename in my "ods pdf"-code. To work around this, I have saved the image in my work, but still the image is not added to the pdf. How can this be done? The error I get is something like: image GT00/f100 is not found. Since the svg-file is an xml-document it somewhere in the code finds this GTxx/xxx-code. Do I really need to convert it in someway? I am not able to generate a PNG-file as a workaround, even though I add "imageType: png" to the call. This doesnt seem to work, it keeps spitting SVG. I have tried other api-calls but this endpoint is the only one working for me. For example, everything beginning with "&base_uri/visualAnalytics" doesnt work here. Is this because I'm working with viya 3.5? The error-message is something like: http 404, sas va nog found on this server. But the rest of the api's work. FILENAME vaJason TEMP;
/* FILENAME hdrout TEMP; */
PROC HTTP
METHOD="GET"
oauth_bearer=sas_services
out=vaJason
URL = "&BASE_URI/visualAnalytics/";
HEADERS "Accept" = "application/vnd.sas.api+json";
/* debug RESPONSE_BODY OUTPUT_TEXT; */
debug level=3;
RUN;
LIBNAME vaJason json; This is a piece of the code I use to output to ODS PDF. data _null_;
a=pathname('work');
call symput('tt',strip(a));
run;
filename
f_pdf
filesrvc parenturi="&SYS_JES_JOB_URI"
name='_webstream.pdf'
contenttype='application/pdf'
contentdisp="attachment; test.pdf"
;
ods pdf file=f_pdf;
ods escapechar='^';
options nodate nonumber orientation=portrait;
ods pdf text='^S={just=center font=("Verdana",8PT,Bold Italic)}Test pdf';
Title j=l "^{style[preimage=""&tt./test1.svg""]}";
proc print data=sashelp.cars(obs=3) noobs;
run;
ods pdf close; A lot of this works but I cannot seem to add an image. And even when this works I still have another problem with all this. The datasources used are genereated in the Job Execution and stored in the CASUSER. When I developed the report the datasources were linked to casuser(dennis.remy@ilent.nl). I had to change this to casuser for others to be able to work with the report. But after changing this (what was very dificult because I was not able to do his under my own account, even though I created the report, I had to ask a collegae to change this), the http-call returns an error that the datasources are not accessible. So this, for now, only works with an old version of the report where the lib datasource is still casuser(dennis.remy@ilent.nl). But thats another problem. I hope someone has the knowledge to help me with my first problem. Thanx a lot!
... View more
Hi, I have a library of 100+ datasets each with 10+variables. I was wondering if it was possible to output an excel table that had the table name and the column names to the right kind of like the format below. Dataset_name1 | variable_1 | variable_2 dataset_name2 | variable_1 | variable_2| .... Any help would be greatly appreciated. Thank you.
... View more
A new update is available for Base SAS , version 9.4_M8 : Hot Fix: L8X049 - Published 22MAY2024 , Download link for L8X049 Component name: Base SAS Related SAS release: 9.4 Issues addressed in L8X049 SAS Note 70801 The SQL procedure displays the note “The execution of this query involves performing one or more Cartesian product joins that can not be optimized” This list of notes might be incomplete. For a complete list of issues addressed by this hot fix, visit the hot fix page for L8X049 Note: A comprehensive list of all SAS hot fixes is available from support.sas.com. You can use the SAS Hot Fix Analysis, Download, and Deployment (SASHFADD) tool to manage your SAS hot fixes.
... View more
Hi All, my teammates have sas newly installed in pc and got the above message when trying to use it. Any idea what could be the problem? just had sas eg installed but cannot use it, showing error message in the above attached picture. I also pinged it. What could be the problem? what other test can I do to trouble shoot? how to resolve?
... View more