Changing the default email option to attach the report instead of including a link

A great way to get me to figure something out is to tell me it can’t be done. Soooo….

I recently received a request to set the default email option to “attach report output” instead of “include link”. It’s a fairly common request, so it was surprising that there was no officially supported way. It turns out that IBM did sneak in a way in 12.1, without updating the docs!

To begin with, you need to be a sys admin. Open the hamburger menu, configuration, system. Expand Advanced Settings, and paste the following into the Key:
Admin.defaultEmailAttachReport by default the value will be “myDefault”. Change the value to true, like you see in the following image:

Close, log off and back in, and try sending an email (via Schedule or Run As) through Cognos. If it worked, the attach report output should be toggled on.

Now this is great for those on 12.1 and higher, but what about the poor folks on earlier versions? I only have 12.0 to test on, but we can do the following.

On the gateway server, navigate to the following folder:
\ibm\cognos\analytics\webcontent\bi\ba-react-admin

There should be a single JS file in there. ba-react-admin.min.js
BACK THAT UP! Copy it, print it out, carve it into slate, whatever it takes for you to restore it if we break anything (or if you ever need support from IBM, we can pretend we didn’t modify any internal files. Don’t worry, my lips are sealed.).

Now that we backed it up, let’s open it in notepad and look for the following string:
defaultEmailAsURL:!(null!==(r=a.props.schedule.getOption("email","runOptionBoolean"))&&void 0!==r&&r.value)

change that to:
defaultEmailAsURL:false

Now let’s search for
defaultEmailAsAttachment:!0

change that to
defaultEmailAsAttachment:true

(Yes, it’s technically the same thing, but !0 for true is just silly).

Since we’re updating a JS file, we don’t need to restart Cognos. Clear your browser cache, and refresh. Try doing a run as again. The email options should be updated.

I’ve been doing some testing, and haven’t seen any unexpected side effects from doing this, but I cannot guarantee that this won’t cause issues. If you have multiple gateways, you’ll need to update each of them. This change won’t survive any updates or fix packs, but if you are upgrading, just upgrade to 12.1 already!

Also, a note about the blog. I’ve been making some changes. The biggest is the removal of the comments. This was not a decision I made lightly, but unfortunately the amount of spam I’ve received was one of the major reasons I stopped posting. I had 4 different spam blockers, blocking upwards of five thousand spam comments each month, and spam was still getting through. I’ll try to find some compromise here, but it’s not likely to happen soon.

NECUG – New England Cognos User Group

Hello Everyone!

It’s been a long time since I’ve posted, but don’t worry, I’ve been keeping busy. I’ll try to start writing more in the upcoming months, but in the meantime I have a small announcement. NECUG is starting up operations again, and I’ve joined their team. We’re looking at a session in June, but we need your input. If you’re at all interested, please consider filling out this form: https://forms.gle/cENP93Lgk3xCXxFq5

While I would hate to push my own personal agenda, I personally think virtual or mixed meetings would be ideal. I’m a few KM away from New England, and getting there to present a session would be a little difficult. If all goes well, I hope to see everyone (virtually) there in June!

Less than a week until TechXChange!

With one week to go, I have some good and some bad news regarding my session.

Let’s start with the bad news. Due to some really bad timing and conflicting schedules, I have to withdraw from my bursting session. Don’t worry though, the session itself is still happening! My good friends and colleagues Rory Cornelius and Craig Colangelo will be taking over for me. Also, I’m hoping to repeat the session itself at the New England User Group happening in October.

And the good news! I have three other sessions planned, PLUS I’ll be at the AIDAUG sessions on Monday.

Let’s go over the other sessions I have:

Tuesday at 3:45 PM
Harnessing the Stars: Using Cognos for Astrological Forecasting – a warning on generative AI [4933]

Astrology has been used for centuries to make predictions about the future, but can it be integrated with modern data analytics? This session will explore how Cognos can be used to create astrological forecasting applications. Attendees will learn how to use Cognos to analyze planetary positions, astrological events, and other celestial data to generate predictions about future events. But here in reality, we will discuss how AI can generate insane proposals, and the best way to leverage AI without falling into the trap of blindly accepting everything it generates. AI has revolutionized many industries, however when it comes to generating proposals, particularly in complex and critical decision-making processes, it is crucial to approach AI-generated suggestions with caution.
Session Type: Technology Breakout

Sounds ridiculous? It should! ChatGPT suggested that as a session. I’m using this as a platform to rant about how Generative AI is a tool that is still in it’s infancy. People shouldn’t 100% be relying on it, instead it should be used a starting point.

Wednesday I have two more sessions:
At 9:15AM:

Customizing Cognos Analytics: Enhancing User Experience and Adding New Features [1286]

Cognos Analytics is a powerful BI platform that enables data-driven decision-making. In this session, we’ll explore ways to customize CA to meet specific organizational needs, from changing its look and feel to adding new features. We’ll discuss modifying CA’s architecture, using custom themes and skins, and integrating third-party tools. We’ll also cover adding new features like buttons and services, including UI design, functionality development, and platform integration. By the end of this session, attendees will have a clear understanding of the different ways in which Cognos Analytics can be customized and will have the knowledge and tools they need to enhance the user experience and add new features to their own implementations.
Session Type: Technology Breakout

In this I go over, in detail, how I make extensions. From minor spec.json changes to complicated JavaScript extensions. During the session I’ll go over making a new extension, one inspired by the astrology silliness.

At 2:30PM

Third party tools in Cognos Analytics [1436]

In this session, we will explore the benefits and challenges of using third-party tools in Cognos. Specifically, we will focus on the use of CogBox, a popular add-on tool for Cognos that extends its functionality. We will discuss how CogBox can help you streamline your data analytics process by providing new tools for report and dashboard authors. Along the way, we will highlight some of the potential pitfalls of using third-party tools in Cognos and provide tips for ensuring a smooth integration. Whether you are a seasoned Cognos developer or just starting out, this session will provide valuable insights into how third-party tools can help you get the most out of Cognos.
Session Type: Tech Byte

This is a tech byte, so it’s only 30 minutes long. I’ll go over the pros and cons of using third party tools in Cognos. And then, of course, I’ll show off all of the really cool and fun tools I’ve added to Cognos.

There are a bunch of unmissable sessions, but here’s a few:
Thursday at 8AM:

Harnessing IBM Analytics API: Building Fast, Responsive, and Visually Impressive Dashboards [4954]

Join us in this interactive technical session, where we’ll steer you through the process of creating a super fast and appealing dashboard leveraging the IBM Analytics REST API. We’ll demonstrate how to invoke the REST API with plain JavaScript and Angular and incorporate numerous IBM Analytics Reports for sub-three-second data visualization. Designed for multi-device compatibility, the dashboard emphasizes speed, design elegance, and user-friendly interactivity. All examples used will be openly sourced, allowing participants to recreate and tailor the dashboard to their requirements. By the end of the session, you’ll be equipped with the knowledge to create striking, highly responsive dashboards utilizing the IBM Analytics REST API.
Session Type: User Showcase Session

My good friend (and fellow AIDAUG board member) Ralf Roeber talks about using the JavaScript API in Cognos. Trust me, there is a ton of stuff you can do.

Thursday at 9:15 AM:

Unlocking Advanced Analytics with Cognos Customizations [3542]

Enhance your business analytics with Cognos customizations! This intermediate session highlights the creation of custom visualizations, maps, schematics, and extensions. Transform data into powerful insights and uncover geographic patterns with custom maps. Simplify complex relationships through custom schematics, and discover endless possibilities to enhance functionality to meet unique business needs. Don’t miss this chance to revolutionize your data-driven decision-making and fulfill advanced business analytics requirements.
Session Type: Product Tips & Tricks Session

This is going to be similar to mine, but will cover areas I don’t get into. Visualizations, maps, schematics, and so on. Jonah Mudse and I had a great call to make sure we weren’t overlapping.

The sad thing for me is both of these sessions are happening Thursday, while I will be flying back home. But trust me on this, were it not for the threat of mariticide, I would definitely be staying a day longer just for those. Sorry fellas, the wife wins this one.

If you are going, let me know! I love meeting fellow nerds, and we can chat about stupid ChatGPT responses and talk about Cognos and funs ways to break it.