EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB19099: When exporting a report to Microsoft Excel, the report name is not generated correctly in MicroStrategy Web before 10.7 and 10.4.4


Community Admin

• Strategy


When exporting a report to Microsoft Excel, the report name is not generated correctly in MicroStrategy Web before 10.7 and 10.4.4

SYMPTOM
When exporting a report from Strategy Web before version 10.7 and 10.4.4 to any format that will be opened using Microsoft Excel, the report name that appears either in the sheet tab or 'save as' file name section is not rendered correctly.
 
STEPS TO REPRODUCE:
Follow the steps below to reproduce this issue:

  • Execute a report and click on either the export icon or go to File > Export. When prompted, select Open as shown below:
ka04W000000Oab4QAC_0EM4400000028Xg.jpeg
  • Using the Electronics Revenue vs. Forecast report from the Strategy Tutorial project, the following results are obtained:
    Timestamp as report name:
ka04W000000Oab4QAC_0EM4400000028Xi.jpeg
  •  
    Main.aspx or Main.esp as report name:
ka04W000000Oab4QAC_0EM4400000028Xa.jpeg
  • The 'Save as' default report name will also be empty in this case.
     

NOTES:
This issue can also occur when exporting to Excel with formatting.
The expected behavior is to have the report name, 'Electronics Revenue vs. Forecast' in this example, populated in the sheet tab and in the Save As dialog window, as shown below:

ka04W000000Oab4QAC_0EM4400000028Xw.jpeg

CAUSE
The reason for the behavior above is because Internet Explorer cannot correctly get the file name from response header. By default, IE uses the last part of the URL as file name. Depending on the size of the report, the last part of the URL is either timestamp (for small report without wait page triggered) or Main.aspx/mstrWeb (for larger report with wait page triggered).
WORKAROUND:

  • If instead of choosing 'Open' the user selects 'Save' the report name is used to Save the file.
  • Use other browser that could correctly get file name, such as Google Chrome or Firefox.

ACTION
Start from Strategy 10.7(for feature release) and 10.4.4(for platform release 10.4.x), Strategy added a new parameter force-download to the response header Strategy Web sends with the Excel file to the client browser so the browser will open the file in a stand alone instance of Microsoft Excel instead being embedded in the browser.
 
To achieve same result in older version of Strategy Web, perform the following:
1.Modify the exportFormats.xml under \WEB-INF\xml\config folder within the Strategy Web directory using the best practices outlined on the MSDL
2.Within the exportFormats.xml file, add the parameter force-download="true" to the excelPlaintext export format type:
<export-format
name="excelPlaintext" desc="Excel with plaintext" desc-id="mstrWeb.249"
file-extension="xls" mime-type="application/vnd.ms-excel"
style="ReportGridStyleExportExcelPlainText"
bean-type="ReportBean" view-mode="com.Strategy.web.objects.EnumWebReportViewMode.ReportViewModeGrid"
export-format-type="com.Strategy.web.app.beans.EnumExportFormats.ExportFormatExcelWithPlaintext"
page-name="exportBinary"
force-download="true" 
3.Make this modification on all the export formats:

  • <export-format name="excelPlaintext"/>
  • <export-format name="csv"/>
  • <export-format name="excelFormattingGridsIServer"/>
  • <export-format name="excelFormattingGraphsIServer"/>
  • <export-format name="excelWithoutFormatting"/>  

4.Save the changes and restart the Web Server.
Customization Code Warning:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build.
 
KB19099


Comment

0 comments

Details

Knowledge Article

Published:

June 13, 2017

Last Updated:

September 3, 2018