Skip to main content

set name to excel export file using previous selected component values

Comments

1 comment

  • VISUI

    You would need to refresh the container which contains the Action.ExportExcel element so that the values of the inputs are available as @Request Tokens.

    <Report ID="LogiForum.exportfilename">
    <Body>
    <Division ID="divFilters">
    <InputSelectList ID="inpColor" OptionCaptionColumn="Color" OptionValueColumn="Color" DefaultValue="@Request.inpColor~" IncludeBlank="True" IncludeBlankCaption="Select Color">
    <DataLayer Type="Static">
    <StaticDataRow Color="Red" Shade="Brick Red" />
    <StaticDataRow Color="Red" Shade="Tibetan Red" />
    <StaticDataRow Color="Green" Shade="Kelly Green" />
    <StaticDataRow Color="Green" Shade="Emerald Green" />
    <StaticDataRow Color="Blue" Shade="Ocean Blue" />
    <StaticDataRow Color="Blue" Shade="Sky Blue" />
    <DataLayerLink ID="dllinked" />
    <DeDuplicateFilter DataColumns="Color" />
    </DataLayer>
    </InputSelectList>
    <Button ID="btnSumbit" Caption="Submit">
    <Action Type="RefreshElement" ElementID="divReport" ID="areReport" />
    </Button>
    </Division>
    <Division ID="divReport">
    <Division ID="divExport">
    <Button ID="btnExport" Caption="Excel">
    <Action Type="NativeExcel" ID="actExcel">
    <Target Type="NativeExcel" ExcelOutputFormat="Excel2007" ExportDataTableID="dt" ExportFilename="ColorReport - @Request.inpColor~" />
    </Action>
    </Button>
    </Division>
    <DataTable ID="dt">
    <DataLayer Type="Linked" LinkedDataLayerID="dllinked">
    <CompareFilter CompareType="=" DataColumn="Color" ID="cfColor" CompareValue="@Request.inpColor~" />
    </DataLayer>
    <AutoColumns />
    </DataTable>
    </Division>
    </Body>
    <ideTestParams inpColor="" />
    </Report>

     

    Another option would be to utilize javascript to build the name of the export based on selections and pass it to the javascript used by the Action.Export element.

    VISUI can assist with solutions such as these.

     

    1

Please sign in to leave a comment.