Customize PDF export layout

The following article from the Canvas Help page explains how you can customize the PDF export layout with just a few lines of CSS and one Bootstrap class:

1 Like

Hi Vincent,

Is there a way to set the default layout for a report that involves active form?

For example, for an OPEX module; during online interaction online the user may interact with accounts to get the detail line items as an extension to its account. But during print, the report to default to expand both account and line items dimensions.

I understand it’s probably possible to hide it depending whether it’s printing or not, but what’s the best practice here; because if I calculate them but just hiding them, then that would have an impact on performance, right?

Jon

Hi @jlee

If I understand correctly, you want to show different subsets when user is viewing the report or when the user is printing the report.

The row set of an Active Form is driven by either a subset or a mdx.

<tm1-ui-rpt-row 
   tm1-dimension="Region" 
   tm1-subset="Default" 
   tm1-attribute="Description">
</tm1-ui-rpt-row>

You could try to use two subsets, one for viewing the report and one for printing.

When Canvas print a page into PDF, it uses the current URL. You could store the subset you want to use for printing in the URL. And use the subset in the URL to drive the row set when printing.

To see how to update the URL, you should check the following article:

Hi Vincent,

Thanks for your reply but that isn’t wasn’t what I was after. I guess I was wondering if there’s some variable that’s set during print (instead of using the css) so the page can process whether a set of data retrieval to be done or not depending on whether it’s print mode.

Regards,
Jon