The SAS Output Delivery System and reporting techniques

Enterprise Guide - Report Builder - Get Code

Reply
Frequent Contributor
Posts: 84

Enterprise Guide - Report Builder - Get Code

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.

SAS Super FREQ
Posts: 8,820

Re: Enterprise Guide - Report Builder - Get Code

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

Frequent Contributor
Posts: 84

Re: Enterprise Guide - Report Builder - Get Code

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.

SAS Super FREQ
Posts: 8,820

Re: Enterprise Guide - Report Builder - Get Code

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

Contributor
Posts: 21

Re: Enterprise Guide - Report Builder - Get Code

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.

Ask a Question
Discussion stats
  • 4 replies
  • 763 views
  • 0 likes
  • 3 in conversation