Overview
By default, Cosmos saves a finished report using the report's file name, appending a number if a file with that name already exists. Using the COSMOS.REPORTNAME function in the Cosmos Excel Add-In, you can dynamically control what the saved report is named each time it runs—for example, automatically including the month and year from a report option. This article explains how to check out a report and add the COSMOS.REPORTNAME function to set a dynamic output name.
Checking Out the Report
To begin editing the report, you will navigate to Reports in the left navigation menu and open the report you want to modify. On the report page, you will click Check Out to open the report in the Cosmos Excel Add-In.
Adding the COSMOS.REPORTNAME Function
To insert the report name formula, you will select an empty cell in the workbook where you want to place the function. The cell's contents are hidden when the report runs, so the exact location does not affect the output—choose a cell that is out of the way of your report data.
To enter the function, you will type =COSMOS.REPORTNAME( into the selected cell and press Tab to accept the autocomplete suggestion. A tooltip will appear confirming the function signature: COSMOS.REPORTNAME(name), where name is the value that will be used as the saved report name.
COSMOS.REPORTNAME function tooltip describes the name parameter as the name to set for the current report.To build a dynamic name, you will provide a text string as the name argument, combining static text with Excel formulas that reference values already in the workbook. For example, if cell C2 contains the report's as-of date, you can construct a name like "Income Statement Forecast - "&TEXT(C2,"MMMM YYYY") to produce an output such as Income Statement Forecast - July 2024. You can reference report option cells or any other cell in the workbook to make the name as dynamic as needed.
Running the Report to Verify the Name
To confirm the function is working, you will run a preview from the Cosmos Excel Add-In panel by selecting your desired date option and clicking Run Preview. When the report completes, the saved file will reflect the name produced by your formula—for example, Income Statement Forecast - July 2024 or Income Statement Forecast - August 2024 depending on the date selected.
Note: If a report with the same generated name already exists in your saved reports, Cosmos will append a number to the end of the file name to avoid overwriting it.
Comments
0 comments
Article is closed for comments.