I have a very simple question. I have been trying to export a set of data (2 columns) from a data-layer that is currently being used on a graph. What I am trying to accomplish is, to obtain the data enclosed in that graph and present it in an excel or csv spreadsheet as data (not the actual graph). I want to know if this is possible without creating a separate data table and linking the export to that. I have tried multiple Action.Export to accomplish this, but I am at a point where I’m not sure if it can be done.
I appreciate any help I might get. Thank you!
UPDATE: This is the modifications I made to your report David, to recreate my issue:
<Body>
<Dashboard2 SaveFile="@Function.AppPhysicalPath~\SavedDashboards\Dashboard.xml" DashboardAdjustable="True" AllowFreeformLayout="False" DashboardTabs="True">
<Panel ID="pnl1" Caption="pnl1" MultipleInstances="True">
<PanelContent>
<Division ShowModes="rdExportCsv" ID="divTable" IdeDisplayStatus="Collapsed">
<DataTable ID="table">
<DataLayer Type="Static" ID="dlStatic1">
<StaticDataRow columnA="Test 1" columnB="100" />
<StaticDataRow columnA="Test 3" columnB="110" />
<StaticDataRow columnA="Test 2" columnB="105" />
<DataLayerLink ID="linkData" />
</DataLayer>
<AutoColumns />
</DataTable>
</Division>
<Division ID="divChart" ShowModes="rdBrowser" IdeDisplayStatus="Collapsed">
<Chart Type="XY" ChartDataColumn="columnB" XYChartType="Bar" ChartHeight="260" ChartWidth="400" ChartLabelColumn="columnA">
<DataLayer Type="Linked" LinkedDataLayerID="linkData" />
</Chart>
</Division>
<Button ID="ExportCSV" Caption="Export CSV" IdeDisplayStatus="Collapsed">
<Action Type="CSV">
<Target Type="CSV" ExportDataTableID="table" />
</Action>
</Button>
</PanelContent>
</Panel>
</Dashboard2>
After clicking the export button, it exports to a CSV file, but with the error I mentioned in the comments below. Any ideas? Thank you!
Yes, you will need to create a separate data table to export columns as Excel or CSV. The reason being, the Logi engine uses the column attributes to instruct the export behavior correctly (eg. width, data type, data formatting, etc). The table you build doesn’t need to be displayed in your interactive version of the report, however. You can use “ShowModes” to show the chart during the web output, and use the table for the exported content. Also, you can use “Linked” datalayers to populate both the table and the chart, so that your query or other data source call only needs to be executed 1 time.
Here’s a simple example, using both concepts- LinkedData Layers and ShowModes