Home › Discussions › Questions & Answers › Custom Excel Sheet Naming via Dependent Parameter
Custom Excel Sheet Naming via Dependent Parameter
Customer · · Questions & Answers · 9 replies
I need the output Excel file’s data sheet name to include the selected Operating Unit, so users can easily distinguish outputs. I also want this parameter to be hidden from the user interface. How can I set this up?
9 replies
To set a custom Excel sheet name dynamically, you must utilize the `:sheet_name` anchor. Although this anchor can be configured as a visible parameter, you can easily hide it by assigning a negative value to its display sequence. To make the sheet name dependent on the ‘Operating Unit’ parameter, you should define a default value using the `:$flex$.parameter_name` token notation. For instance, the default value could be set as `:$flex$.operating_unit||’ suppliers’` to concatenate the selected operating unit value with the word ‘suppliers’ for the sheet name.
Where exactly is the `:sheet_name` anchor referenced in the report definition, and does it require corresponding SQL text like the lexical anchors?
The `:sheet_name` mechanism is managed through the parameter definition itself and does not require injection into the main report SQL like the `n=n` or `&lexical` anchors. The parameter definition identifies the `:sheet_name` anchor, and the corresponding default value you define is used to set the name of the Excel data sheet when the report runs. By default, if this parameter is not used, the Excel output’s data sheet name is simply the same as the report name.
If I also want to dynamically set the final output file name (the file downloaded to the client desktop) to include tokens like the report name and request ID, where is this configured?
The final output filename that is downloaded to the client desktop is controlled separately in the Report Options section under the field ‘Output Filename’. In this field, you can define a naming convention that utilizes tokens to dynamically generate the name. Useful tokens include “, “, “, and parameterized values like “ or formatted dates using “. If you use the token “, all spaces are automatically replaced with underscores.
We sometimes need to save a copy of the output file to a directory on the database server. Where do I define this location?
You can specify a secondary location to save a copy of the report output file in the ‘Additional Out. Directory on DB Server’ field under Report Options. This functionality is typically restricted to users with Developer access. The list of available directories is fetched from the `dba_directories` table, and similar to the Output Filename, tokens can be used here to create a dynamic path based on runtime parameter values.
If the report generates zero rows, will the output still be sent via email if scheduled using standard Oracle delivery options?
By default, if a scheduled Blitz Report retrieves zero rows, the system will suppress the delivery of an empty output file when using Oracle standard concurrent delivery options. If your business requirement dictates that empty files *must* be sent for scheduled reports, you need to change the profile option ‘Blitz Report Suppress Empty File Delivery’ and set its value to ‘No’.
- You must be logged in to reply to this post.
Sign in with LinkedIn or Google to take part.