|
Re: How to specify a relative path to sample XML file [message #368552 is a reply to message #368538] |
Tue, 09 June 2009 14:39 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.windstream.net
Velu,
You should be able to use a connection profile to specify the hard
location. Each developer then could use his/her own profile. The
server could also use one as well.
Another option is to use an expression on the property binding for the
file name. The expression should be similar to this:
importPackage( Packages.java.io );
importPackage( Packages.javax.servlet.http );
if(
reportContext.getHttpServletRequest().getAttribute("attributeBean ").isDesigner()
){
"C:\\xfer\\company.xml";
}else{
var rp =
reportContext.getHttpServletRequest().getSession().getServle tContext().getRealPath( "/Report");
"file:///"+rp+"/company.xml";
}
Jason
velu wrote:
> Hello,
>
> I am using a XML datasource for my report. In the setup for a XML
> datasource I have to enter the location of a file that contains a sample
> of the XML data (I have NOT provided the XML schema and hence BIRT needs
> to use this to figure out the structure of the XML data). By default
> BIRT stores the full path to the sample XML file in the rptdesign rather
> than a relative path.
>
> Currently it is an issue for us if we have to specify the absolute path
> since different developers in the team install our code base under
> different root folders.
>
> Is there a way to specify a relative path to the XML file that is
> specified in setting up a XML data source(relative to either the
> location of the rptdesign file or to some root folder of BIRT) ?
>
> thanks,
> Velu
>
|
|
|
|
Re: How to specify a relative path to sample XML file [message #368569 is a reply to message #368558] |
Wed, 10 June 2009 16:06 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.windstream.net
Velu,
You are correct. you may want to log a bug for this. What I was trying
to show is that you could always build script to look for something like
the workspace folder etc and make it portable.
Jason
velu wrote:
> Hi Jason,
>
> I am not sure if that will solve my issue, but please correct me if I am
> wrong.
> In the example you show, it looks like it returns an absolute path in
> case it is run in the designer. However, in our case even in the
> development environment, we do NOT want to use an absolute path to the
> XML file. The main reason for this is that these XML files will be
> checked into version control along with the java source code. Developers
> checkout the codebase from version control and install the code under
> any folder they choose to and this folder will correspond to the
> "Workspace" within Eclipse IDE.
>
> thanks,
> Velu
>
|
|
|
|
Re: How to specify a relative path to sample XML file [message #754422 is a reply to message #754381] |
Wed, 02 November 2011 14:01 |
Eclipse User |
|
|
|
2.11.2011 13:49, Fabricio kirjoitti:
> Any solution so far? Im facing the same problem!
What was the problem? Somehow I do not see the original post/question? I
may have a solution to this, as I use relative paths in my BIRT
installation...
--
Your business will assume vast proportions.
|
|
|
Powered by
FUDForum. Page generated in 0.03506 seconds