BookmarkSubscribeRSS Feed
wcp_fnfg
Obsidian | Level 7

After a report is designed in the report builder, is there a way to get the code for it so that it can be used with ODS?

EG 5.1

Thanks.

4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi:

  As far as I know, there is not a way to generate code for/from the Report facility in EG. EG takes the SAS Report XML version of the report and manipulates the XML in the Report window to generate a Report laid out in the structure you design.

  You could come up with something similar by using the ODS HTMLPANEL destination and/or using ODS LAYOUT with ODS PDF -- but both of those methods involve learning/using code and are highly destination specific.

  You can investigate both of those techniques here:

ODS HTMLPANEL: Base SAS: htmlpanel Tagset Controls Paneling

ODS LAYOUT: http://support.sas.com/resources/papers/proceedings14/SAS330-2014.pdf

cynthia

wcp_fnfg
Obsidian | Level 7

So if I wanted to create a PDF of this report is there anyway to do such a thing?  Automatically that is, rather than manually going to the export button.

Cynthia_sas
SAS Super FREQ

Hi:

Did you look at the ODS LAYOUT paper? Without seeing what the final report looks like, it is nearly impossible to comment. Your report could be as simple as a single table and a single graph next to each other. Or, it could be more complicated. There's no way to know.

  Depending on what you want to do, you will have to write code. It might be as simple as exporting your EG project code into a .SAS file and then manually inserting ODS LAYOUT statements in the right places. Or, you might need more ODS knowledge or you might need different report procedures. It is hard to comment without any idea of what, exactly, your final report looks like and what, exactly, your input data looks like and what, exactly your EG generated code looks like (that generates the objects that make up the final report). And since all of those things are a lot to post to the Forums, this might indicate that your needs might be better met by Tech Support, who can look at ALL your data, ALL your code, your FINAL report and help you with an approach.

  But, first, you should look at some of the ODS LAYOUT examples to see whether that is even a road you want to go down.

cynthia

Marina
Calcite | Level 5

Hi,

If you are using List Report Wizard in SAS Enterprise Guide, code for the task would be on the "Code" Tab. You can copy it, paste in your program, and add ODS statements.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1964 views
  • 0 likes
  • 3 in conversation