11-08-2022
03:31 PM
- last edited on
05-24-2023
11:19 AM
by
JackLacava
What do I need to add to our book settings in order to get the file to export with variables within the filename? For example, I'd like our consolidated financial book to save as the time defined in the parameter as "2022M10 Financial Statements.pdf."
11-08-2022 04:08 PM
Can you share the setup of the Book? And how are you planning to run the book?
11-08-2022 04:30 PM
See setup above. The pdf is generated from the OPEN ALL IN PDF button.
11-08-2022 05:15 PM
Thank you for sharing that information.
You could create a "shell" book which is a .zipbook, which contains your .pdfbook, and provide the Output name there; in this instance I used the substitution variable |WFTime|
When run, the zip file will open with the PDF file named accordingly:
Hope that helps!
11-08-2022 05:33 PM
Looks like I can't enter my period parameter (|P_PeriodPrompt|) as it says there are illegal characters, if I enter |WFTime| or |CVTime| is processes the file, but it doesn't tie to the selected time parameter....I also get an error when trying to open the extracted pdf file
11-10-2022 06:34 AM
Chances are that that parameter contains characters like / or :, which might be breaking things somewhere. You might want to wrap that into an XFBR that sanitizes it.
11-10-2022 09:24 AM
I'm still getting the illegal characters error... but not sure if I setup or am using the XFBR rule correctly... I've tried replacing "BRString" with "XFBR" as well as taking the exclamation points out in the parameter...
DASHBOARD XFBR STRING BUSINESS RULE:
BOOK SETUP:
ERROR:
ERROR DETAILS:
Source code: WcfRetryManager.cs, line 279, method ExecuteRetries.
.
Source code: WcfRetryManager.cs, line 351, method ExecuteRetriesStartingWithPreferredAppServerIndex.
.
Source code: WcfRetryManager.cs, line 483, method TryExecuteAction.
.
Source code: FileSystemWcf.cs, line 419, method GetFile.
.
Source code: FileSystemWcf.cs, line 563, method GetFileStream.
.
Source code: ExtensibleDocumentsWcf.cs, line 543, method ConvertStringsInFileUsingSubstitutionVariables.
.
Source code: ExtensibleDocBook.cs, line 274, method ConvertStringsInFileUsingSubstitutionVariables.
.
Source code: ExtensibleDocBook.cs, line 332, method ConvertStringsInFileUsingSubstitutionVariables.
.
Source code: XFLoopProviderHelper.cs, line 241, method RecursiveProcessChildItems.
.
Source code: XFLoopProviderHelper.cs, line 393, method RecursiveProcessLoopProviderItem.
.
Source code: ExtensibleDocBook.cs, line 474, method OnLoopProviderProcessItem.
.
Source code: ExtensibleDocBook.cs, line 698, method GetDashboardPrintItemForFile.
Illegal characters in path.
User Interface Stack Trace:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at OneStream.Client.SharedUI.FileExplorerServiceReference.FileExplorerService.GetFileData(SessionInfo si, FileSystemLocation fileSystemLocation, String fileFullName, Int32 maxFileSize, Boolean processExtensibleDocument, Boolean convertToPdf, Dictionary`2 customSubstVars)
at OneStream.Client.SharedUI.FileLauncher.ProcessAndLaunchFileSystemFileUsingWPFClient(SessionInfo si, FileSystemLocation fileSystemLocation, String fileName, Boolean processExtensibleDocument, Boolean convertToPdf, Dictionary`2 customSubstVars, FileLaunchType fileLaunchType) in C:\agent\_work\606\s\Source\Client\Windows\ClientWindowsSharedUI\FileSystem\FileLauncher.cs:line 608
11-10-2022 09:30 AM - edited 11-10-2022 09:33 AM
The right syntax to apply such an XFBR is:
XFBR(_BR_BookTitle, ConsBook, P_PeriodPrompt=|!P_PeriodPrompt!|)
XFBRs don't pick up Parameters automatically.
Note that, in the code seen, you're not doing any sanitizing, so any bad character will continue to be passed. You can have a look for a possible technique to do that in this post: https://community.onestreamsoftware.com/t5/Blog/Building-BiBlend-table-names-or-a-classic-tale-of-XF...