|
FlexCel Studio for VCL/LCL
|
Template that will be used to create the report.
property Template: TFileName;
__property TFileName Template;
When calling TCustomFlexCelReport.Run (TStream, TStream) this value is not used.
Path can (and normally should) be relative. For example, if you set Template:= 'templ\t1.xls', and your exe is at c:\myApp, it will search for the template at 'c:\myApp\templ\t1.xls'.
The order in which FlexCel searches for templates is:
1) If the path is an absolute path, it will use it.
2) If the path is relative, it will first search for it in the folder where the application is.
3) If it couldn't find it, it will search for the template in the folder where the package is, if FlexCel is in a package. This might be useful if you are running for example in IIS where the the path for the Application is the path for IIS and not for your dll.
The method that does the actual searching is SearchPathStr, you can use this method also also when using the API.
Using relative paths is very useful for deploying your application to different places. If you hardcode the path, for example "c:\xx\t1.xls', and your user has it at drive d, it won't work. it you just write t1.xls, it will.
If you are using a TemplateStore, FlexCel will use it for the Template, and will not search the disks. You can still let the path info in the template property, but it will not be used. For example, if Template:= 'templ\t1.xls', FlexCel will search for t1.xls inside the TemplateStore.
|
Copyright (c) 2002-2008 TMS Software. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|