I need to set a value in a properties file and then read this value in a PRPT in Pentaho 5.3.If I understand it, the file where to add my property is design-tools/report-designer/resources/classic-engine.properties (Report Designer) and server/biserver-ee/tomcat/webapps/pentaho/WEB-INF/classes/classic-engine.properties (BI server, once published).That's right?
If so, could you tell me how I can read this value (example, pentaho.images.path=c:/myProject/images/) in my PRPT file? If not, could you explain to me how to do?
Thank you!
I found a solution... I write it if that can be useful to someone.
Files listed in question are correct. We need write in classic-engine.properties:
org.pentaho.reporting.engine.classic.core.environment.pentahoImgPath=c:/myProject/images/
org.pentaho.reporting.engine.classic.core.env-mapping.pentahoImgPath=env\:\:pentahoImgPath
Restart the Report Designer. Now, we have a new environment variable in PRPT file once opened with the Report Designer, env::pentahoImgPath
The value is contained in "org.pentaho.reporting.engine.classic.core.environment.pentahoImgPath" key (c:/myProject/images/).
Bye.
Andrea
Related
I want to know who (Windows username)created and who have modified a particular qlikview file. I have checked the xml files created from the qvw file using the -prj method, but there is nothing related to that. There is also a file with .dat extension which might have storing this information. Can anyone help me in reading that dat file.
A better way of doing this in the future is to implement a source control system, you are out of luck with Qlikview as it does not capture this information.
The author and/or last changed user name is not part of the default
metadata inserted into the document. So unless something similar to
the suggestions above was already in the document, there will be no
way of determining who was responsible.
Source
A better place to look is your windows environment and see if the information is held in a back-up.
I am when trying to use java / c# or any other programming language to modify .pbix file which generated from Microsoft Power BI. Is there any dll provided by POWER BI or how can i read the content through program. I just want to get and update the datasource directory. Please help.
Thanks.
I don't think it's possible, and even if it is, the solution is likely inelegant.
Even if you managed to do this, you would need to open your PBIX file in the PBI Desktop to refresh your data.
Are you doing this because you have many queries and it's inconvenient to change data source string (folder name) of all of them? There is a way to keep your connection string in a single variable as described here.
I don't know your exact setup, but looking at your question, lets say you have sets of files in different folders and you want to change the folder in one step.
To use the approach from the link above but with file input, you need to do the following:
If it's a new report, import your files as usual
Create new query: "New Source"->"Blank Query"
You will see "Query1" and an empty text box, enter the folder name, for example "C:\". Rename this query to "Folder".
Go to your imported file in the query editor, "test1" in my example. In query settings on the right, select source.
Change the filename by substituting the folder with your "Folder" query, for example:
...File.Contents("C:\test1.csv"),...
...File.Contents(Folder & "test1.csv"),...
Repeat for all imported files, then "Close & Apply".
Now whenever you need to change the folder with your files, edit your "Folder" value and "Refresh".
I am very new to VBA programming , I have a VBA code that reads data from the INI file, the function is like this now my Boss asked me to go with registry ! Can somebody guide me what he meant ? I mean I give the input file,output file in INI file kept in some folder, but what's this registry ? How'd read put input,output file from registry?
I believe he's asking to migrate the INI to a collection of registry strings which can populate your program configuration directly from the registry rather than the INI file. To do this, read this article on creating New Registry Keys -> Here
But before you dive into messing with the registry, verify that is what your boss wants. Because messing with the registry can be a destructive end.
Steve McMahon wrote a great registry class for vb6. You can find it here. http://www.vbaccelerator.com/codelib/inireg/registry.htm
If you intend on using it with MS Access, you'll need to replace all occurrences of App.EXEName with CurrentProject.Name.
You'll want your app to have it's own node under HKEY_CURRENT_USER\Software.
Good luck, and be careful not to mess with any other registry keys.
My problem should be plain and simple to solve, but google is not helping me today.
I need to read/write a configuration file (config.xml) and, as i see so much problems with permissions with special folders, i decided for myDocuments.
Now, from File system (Setup), I added a custom special folder (myDocuments)
added a subfolder (g1OKweb) inside myDocuments
added the file (config.xml) inside g1OKweb
What I expect, reading around, is that during the installation g1OKweb should be created if not existing or older, and the same for config.xml, but it isn't.
Does someone have any clue?
Thanks in advance
Use Directory.CreateDirectory to create the directory before attempting to access the file. This will automatically create all parts of the path that do not yet exist. If the full path already exists, it will do nothing.
When opening the file, use a FileStream constructor overload that allows you to specify FileMode.OpenOrCreate. This will succeed regardless of whether the file already exists or not.
When you have opened the file, check to see if it is empty before parsing it. If it is empty, insert your XML root element first.
I didn't see a question on this subject in the archives, so here goes: For those of you experienced Mercurial users, is this a correct .hgignore file to tell VB.Net Express to ignore files/sub-dirs when adding items in a new repository?
bin
obj
temp
*.user
*.suo
*.ncb
Thank you.
well you either need to start each line with glob: or have the first line
syntax:glob
mine (for C#) has Thumbs.db as well.
edit: you can also set up a global ignore list using your global hgrc