This builds on BSV built in two posts below:
http://www.awareim.com/forum/viewtopic.php?t=3479
http://www.awareim.com/forum/viewtopic.php?t=3481
This BSV demonstrates:
A) naming report files with AwareIM BO attributes in context
B) giving user the ability to save or email report with name from #1
C) eliminating extra messages / mouse clicks in report display
Steps:
1) Add a Report: OneCityReport . Determined at run time. Include City.Name and City.Country on the Detail Line.
2) Add process: ExportAndViewOneCityReport
PICK FROM 'City List' ORDER BY City.Name
EXPORT DOCUMENT OneCityReport TO FILE SystemSettings.ExportPath_Temp+'Report_300__City_'+City.Name+'.pdf'
DISPLAY URL SystemSettings.DisplayURLPrefix_Temp+'Report_300__City_'+City.Name+'.pdf' IN NEW WINDOW
3) Add "One City Report" to the Menu. This will run process from #2 above.
Now run a test:
After clicking the menu option from #3 above, you will get a Pick list.
When you choose a city & click OK, the PDF report will open in a new screen. It can be saved or emailed with a name that includes the City the user selected.
Obviously you can use different syntax of DISPLAY URL depending on your needs.
Export Reports using AwareIM data & Displaying same (#3)
Export Reports using AwareIM data & Displaying same (#3)
Tom - V8.8 build 3137 - MySql / PostGres
It should be possible.Is it possible to display url containing path where document was exported IN FOLDER ?
You would have to modify the syntax here to use the folder name in the URL being build for display:
DISPLAY URL SystemSettings.DisplayURLPrefix_Temp+'Report_300__City_'+City.Name+'.pdf' IN NEW WINDOW
Tom - V8.8 build 3137 - MySql / PostGres
I meant
So how is it possible to get path of that created file?
Code: Select all
The FOLDER keyword specified after the TO keyword identifies the directory in the file system where the file will be written. Note that if the file with this name already exists in the specified folder, it will not be overwritten. Instead another file with the variation of the original name (for example, originalName0) will be created.
AwareIM 5.1a build 1454, Debian 64bit , MySQL
Notice in my rules that I use EXPORT .. TO FILE syntaxEXPORT DOCUMENT OneCityReport TO FILE SystemSettings.ExportPath_Temp+'Report_300__City_'+City.Name+'.pdf'
DISPLAY URL SystemSettings.DisplayURLPrefix_Temp+'Report_300__City_'+City.Name+'.pdf' IN NEW WINDOW
but I allow the configurator or user to determine the folder / path that is used for file storage in SystemSettings.DisplayURLPrefix_Temp
Tom - V8.8 build 3137 - MySql / PostGres
I am trying to construct process of Order BO that:
1) Exports Document based on Order BO to folder A
2) Gets the Path to exported document
3) Stores Path to Order BO attribute DocPath
All Documents are exporting to the same folder A. I think the solution is to use Order.ID as a filename so documents in folder will not be overwritten.
1) Exports Document based on Order BO to folder A
2) Gets the Path to exported document
3) Stores Path to Order BO attribute DocPath
All Documents are exporting to the same folder A. I think the solution is to use Order.ID as a filename so documents in folder will not be overwritten.
AwareIM 5.1a build 1454, Debian 64bit , MySQL