[TIP 78] Controlling Your Export

Taking data outside of Dundas BI, means that you lose the security permissions on it. As a result, as a content creator, you may want to control what data users will have access to, even outside of the system.

To ensure that users can only export the data you want them to be able to export, all you need to do is configure your metric set and decide what can be exported.


For example, aside from denying an export of the entire metric set, you can simply exclude some data elements (measures/dimensions) and prevent the export for those by using the Exclude From Data Export property:


To take it one step further, you can also control the state of your view prior to the export by using the Before Export action. By using this action, you can create a different experience on export, compared to live, online viewing.

For example, you may want to export to PowerPoint and eliminate the space on the dashboard that is reserved for a navigation system. As this navigation system won't be needed in the PowerPoint file, you can simply hide it and make more space for the visuals (By using a small script in the Before Export action, the view will then return to normal after the export).


I have a report i have suppressed certain metric sets from export on, as I don't want these to appear in Excel...However, I DO still want these to appear in PDF...

Mentioned here is using Before Export event to override these properties as needed...Would it be possible to get a script example of doing just that? (in my case i am looking to turn them back ON for export).

Thanks!

This is GOLD!

An example would be great (or link to one).

I have a Dashboard that has a Title area but the user is taking screen shots of just the graph and putting them in PowerPoint (that has it own title area).

I follow the general Idea but the technical details, well just not ready to dive into it today.

The before export script is good to know about.


What you need to understand is that the export process basically creates a new dashboard with the parameters etc. like they are in the view you are looking at. (This new dashboard does not run 'on load' or 'on ready' scripts.)


The before export script is run on this new dashboard before it exports.


I have the exact same situation as you do James, where the client wants navigation and filters etc on the dashboard, but also that the exports look exactly like thier powerpoint report, and I use the before export to solve it. I don't know how much script knowledge you have, but basically my before export script does the following things.

-hide navigation group of objects

-hide other objects like certain buttons and images

-move certain lines up and make them longer

-move certain icons around a bit


You get the idea I hope. Just remember, these changes only happen to the export dashboard but the 'real' dashboard is unaffected.


Let me know if you want more information, but I suspect that it is very dashboard specific.


Hello Paul,


Unfortunately, there is no scripted solution that can solve this request. This is due to the fact that this is a metric set property and you would have issues saving that property at runtime because of not having the required permissions.


Our developer in charge of this area is currently out of the office. I’ve made a note to follow up with him when he’s back and see if we can come up with any other potential solutions.


Hang tight!

I think you can run 2 different buttons on your report and script what each one does. So you can completely separate the excel export and pdf export.

Yes you can do that, but I don't think the script can change the properties of the metric set.

Im meaning more that the scrpt can choose which objects to export

If this is a permissions issue, would there be any way around this? If necessary, I can make all my users PowerUsers, which should in theory give them the necessary permission level to alter metric sets.

as is, there doesn't seem to be any other way for me to limit down reports on excel exports to a data set that makes sense with the exception of suppressing the metric sets that I don't want in the excel file, but this then breaks the exports of PDF's. Is there any level that I would be able to do this at? Adding scripts to the Overrides JS file?

Globally, i pretty much want to suppress metric sets on a PDF export of a report. What appears on the screen is what should be exported. For excel files, its really only the main body metric set that I want to export. I also cannot require that my business users developing reports write custom scripts, and even if they did for the Excel export I would still need to change metric set properties to suppress these in an excel file unless there is another way.

My plan was that the business users could easily mark the metric sets they want in the excel and can then customize the excel exports relatively easily, and that I could override those setting for PDF exports with a standardized funtion that could be added to the BeforeExport event in all my reports, but it's sounding like this may not work.

Hello Paul,


Thank you for patiently waiting for my response.


There is out-of-the-box functionality in Dundas BI that will allow you to achieve this. The metric set property “Prevent Data Export”, can be found in the metric set configuration. This allows you to exclude the entire metric set from Excel exports, but they will still be visible in PDF exports. Using this metric set property will allow you to achieve the use case you specified.


Image title


^ The OP doenst want to prevent any metric sets as he sometimes wants them and sometimes not.
I would say double up that layer and have 2 buttons. Script them to export different tables/visualisations.
One with some metric sets and one with another. im using this all the time.

Something along the line of this should work:
https://www.dundas.com/support/developer/script-library/Export/Export-Specific-Visualization-to-Excel

The setting that Larsen mentioned should get him that. Using this setting, exporting to excel will not include those metrics but the same dashboard export to PDF will. Paul - can you confirm this solution works for you?