Printing Multilevel BOM Report

オフライン

Hello,

I'm using Aras 11 SP12 and I was wondering if there's an easy way to print or export the default reports in Aras like the "Multilevel BOM Report" to get a pdf file or something else that can be used outside of Aras.

Regards

/Rick

Parents
  • Hi Rick,

    In addition to improving the look of reports, Aras Innovator 12.0 also introduced a Print button to allow users to print reports like the Multilevel BOM Report. We can achieve something similar on a limited level in 11.0 SP12 as well by making a change like the one described below.

    1. Login as an admin
    2. Navigate to TOC > Administration > Reports
    3. Search for and open the Multilevel BOM Report
    4. Go to the Stylesheet tab
    5. Add the lines below to the CSS near the top of the stylesheet
      1. @media print {
            tr { page-break-after: always; }
            .no-print { display: none !important; }
        }
      2. The first line here will allow multiple pages to be printed if the table is too large to display on one page
      3. The second line will be used for the next modification
    6. Add a new line to the very top of the <body/> 
      1. <a class="no-print" href="#" onclick="window.print();">Print</a>
      2. This will add a clickable element to the top of the report to print the page
      3. The no-print class here will remove this element from the printable page
    7. IMPORTANT: Click the Apply button at the bottom of the stylesheet before saving the Report
    8. Save the Report

    After making these changes, you should be able to open a Multilevel BOM Report and see your newly added button that allows you to print the report. 

    Note that this change would need to be made per-report as it's implemented above. It may be possible to make this a global change to apply to all reports, but I'm unsure of where such a change could be made.

    Chris

    Christopher Gillis

    Aras Labs Software Engineer

  • Hi Chris,

    It almost worked, but when I add:

    @media print {
        tr { page-break-after: always; }
        .no-print { display: none !important; }
     }

    below the <style type="text/css" userData="Global"> line, the BOM is split into one page for each element of the report.

    The aras logo, the Bill of Materials Report & Generated on: text and each row of the table go on separate pages.

    I also had a separate issue with an error in the window of the report after i pressed print. This might be outside the scope of this discussion but I got a Http-500.0 error with the error-code 0x800703e.

    Module
       ManagedPipelineHandler
    Notification
       ExecuteRequestHandler
    Handler
       ExtensionlessUrlHandler-Integrated-4.0
    Error Code
       0x800703e9
    Requested URL
       http://localhost:80/innovatorbaseserver/Client/scripts/
    Physical Path
       C:\aras\InnovatorBase2019\Innovator\Client\scripts\
    Logon Method
       Anonym
    Logon User
       Anonym

    Is this a well-known issue or would it be more appropriate as a separate question?

    Here's the altered sections of my stylesheet for context, done on a copy of the multilevel bom report.

    style/css:

    <style type="text/css" userData="Global">
        @media print {
            tr { page-break-after: always; }
            .no-print { display: none !important; }
         }
        table  {empty-cells:show; border-collapse:collapse;}
        th {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid; background-color:#CCCCCC; text-transform:capitalize;}
        td {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid;}
        td.noBorder {font-family:helvetica; font-size:8pt;  padding:2px; border-width:0;}
       </style>

    body:

    <body leftmargin="50" topmargin="50">
        <a class="no-print" href="#" onclick="window.print();">Print</a>
        <table width="650" cellpadding="0" cellspacing="0" border="0">
         <tr valign="top">
          <td class="noBorder" colspan="9" align="left">
           <img height="80" src="../imagesLegacy/Logos/aras_logo.gif" />
          </td>
         </tr>
         <tr valign="bottom">
          <td class="noBorder" colspan="8" align="left" style="font-family:helvetica;font-size:15pt;color:#DA1943;padding:2px;">Bill of Materials Report</td>
          <td class="noBorder" colspan="4" align="right" style="font-family:helvetica;font-size:10pt;padding:2px;">
           Generated on:              <script>function m00(r, n){r += ""; if (!n) n = 2; while(r.length &lt; n){r = "0" + r;} return r;} var dt = new Date(); var a = top.opener.top.aras; if (a){var s = m00(dt.getUTCFullYear(),4)+"-"+m00((dt.getUTCMonth()+1))+"-"+m00(dt.getUTCDate())+"T"+m00(dt.getUTCHours())+":"+m00(dt.getUTCMinutes())+":"+m00(dt.getUTCSeconds())+"+0000"; s = a.convertToNeutral(s, "date", "yyyy-MM-ddTHH:mm:sszzz"); s = a.convertFromNeutral(s, "date", "short_date"); document.write(s);}</script>
          </td>
         </tr>
         <tr>
          <th colspan="6">Indenture Level</th>
          <th>Part Number</th>
          <th>Name</th>
          <th>Quantity</th>
          <th>AML Status</th>
          <th>Manufacturer</th>
          <th>Manufacturer Part</th>
         </tr>
         <xsl:call-template name="rootItems" />
        </table>
       </body>

    Best Regards

    /Rick

  • Hi Rick,

    I ran my local test in an 11.0 SP15 instance using the Chrome browser. You might need to change the exact modifications to the stylesheet if you're using a different browser or if the report layout is different in 11.0 SP12.

    Setting up the @media print CSS is a general browser feature that's not unique to Aras Innovator, so there should be plenty of resources available online for help in figuring out the exact styling you need.

    Similarly, the page layout of the container report window may also be different in 11.0 SP12, or this may be an issue with how the browser handles printing if you're using something other than Chrome. I wasn't able to reproduce the 500 error in my SP15 instance.

    Chris

Reply
  • Hi Rick,

    I ran my local test in an 11.0 SP15 instance using the Chrome browser. You might need to change the exact modifications to the stylesheet if you're using a different browser or if the report layout is different in 11.0 SP12.

    Setting up the @media print CSS is a general browser feature that's not unique to Aras Innovator, so there should be plenty of resources available online for help in figuring out the exact styling you need.

    Similarly, the page layout of the container report window may also be different in 11.0 SP12, or this may be an issue with how the browser handles printing if you're using something other than Chrome. I wasn't able to reproduce the 500 error in my SP15 instance.

    Chris

Children