BookmarkSubscribeRSS Feed
Trent
Fluorite | Level 6

Hi SAS folks,

I use custom reports all the time in EG, and despite their quirks they are a huge time-saver.

My problem:  I'd like to control various things like report section headings, dates etc via macro variables or similar, but I cannot seem to get them to evaluate within the custom reports.

For example, if I use a prompt in the report ("&CarMaker") to select Toyota and run my process flow, I'd like to have the word 'Toyota' and the current date (i.e. from the date() function) appear in the report title, preferably with some control over formatting:

______________________________

BIG SAS CAR REPORT

Make:  Toyota

Run Date: 28 November 2014

______________________________

I can easily enough get those bits of information into tables and insert in the report that way,  but I'd really love to get single lines of nice plain text in there as well that I can control procedurally.

Thanks for your time!

7 REPLIES 7
Trent
Fluorite | Level 6

No suggestions?  Also I'm new here, so feel free to let me know if I'm asking in the wrong sub-forum,

Thanks

Reeza
Super User

How are you building your custom report?

Trent
Fluorite | Level 6

Hi Reeza,

I the pick the output of an existing task, e.g. summary table or chart or map etc, then select Create > Report.  This creates a 'Custom Reports' process flow.

I then continue adding results of other task within the Modify Report > Edit Report Contents UI.

Trent
Fluorite | Level 6

Is there a different place to post this?

Thanks again,

Reeza
Super User

No, this is the correct forum. I did look into it, but couldn't get any macro variables to resolve in header/footer.

I'm not sure if it's possible Smiley Sad

Trent
Fluorite | Level 6

Ah, never mind, I suppose I'll have to settle for the terms appearing in a table in the report.

Thanks for checking though!

Reeza
Super User

If you have them in a table, you can use a customized list or proc print or data _null_ step to get them to display nicely though. Not a great workaround, but a workaround.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2335 views
  • 3 likes
  • 2 in conversation