how to reproduce an analytic view in SAP HANA database using the .analyticview xml descriptor file? - hana

I am trying to reproduce an analytic view that have already been modeled in one project within another project using the .analyticview XML file descriptor.
I managed to reproduce the required attribute views by copying and activating the .attributeview XML files to the new project. But when trying to activate the .analyticview I am getting this error:
Internal deployment of object failed;Repository: Encountered an error in repository
runtime extension;Model view/data not consistent:Deploy Model: Empty XML read from
Repository for Dimension URI /path_to_attributeView/attributeviews/ITEM
Obviously the problem is that the analytic view is not able to read the attribute views. So, I tried to edit the path pointing to the attribute views in the .analyticview XML manually, I tried:
using relative paths ./attributeviews/ITEM since the attribute views and analytic view files are in the same folder.
using absolute path, considering that the folder structure of the repository workspace is folder1/folder2/data/name.attributeview I added this path to the file but still getting the same error.
Could you please check what's wrong?
Thanks

Few things:
Are the attribute views visible for the user you are using ?
If you are using HANA studio try to open the analytic view descriptor with the modeler editor to see what is wrong
It will be useful to attached the analytic view xml itself.

Related

Modify product labels xml in Odoo

I’m having several issues when trying to modify the default template of product labels. I need to add some new fields to the existing template that generates the document of product labels (and to design in with proper dimensions).
I am not able to find the xml template to modify it because I can’t find the file. This is a topic I have been researching deeply through the internet during the lasts days and all my attempts have been unsuccessful.
On the Internet, it is said that the product labels are generated using the product/report/product-label.xml and product_label.xsl:
https://www.odoo.com/es_ES/forum/ayuda-1/question/product-label-prints-only-one-variant-attribute-74684
The issue is that I can’t files these files in my Odoo installation folder (tested with both Windows and Ubuntu). These are my folder contents in Ubuntu usr/lib/python3/dist-packages/odoo/addons/product/report:
Should I create the xml and xsl files?
If so, how can I reference them? I have already tried to modify the xml file to try if the options for rendering the report change and nothing’s happens...
Here is the xml that I have been modifying (looks like it is an index of the different available reports but I haven’t found any official documentation regarding this) (note that I’ve added a number to each report title to see if something changes):
And the select options are still the same, as it can be seen in the following screenshot.
Am I’m missing something? It looks like these templates are located somewhere else and I’m editing these files without success (and restarting the Odoo server doesn’t work either...).
I'm using Odoo v12.
Thank you for your help!
<report> tag in odoo is actually shortcut of ir.action.report model record creation, qweb-pdf or qweb-html type of report needs a qweb template to render the report output, which is mentioned in name and file properties in the report tag.
After changing the files in a odoo module, if that module is already installed before change, you have to update the module. You can update from Apps menu of odoo web panel. For example, in this case, you are making change in product module which is named Products & Pricelists in odoo Apps. After making change, update that module and you will find the changes effective. Also, if you are adding new XML file, you have to add respective file name in __manifest.py__, or have to import in __init.py__ if you are adding new python file in the module.

Custom widget in thingworx

Could any body let me know how to create custom widget in thingworx.
I don't have any idea how to create custom widget.
Please help me.
I have to build drag drop custom widget and we can use that custom widget with other widget. e.g with tree widget,... etc.
I would recommend reading the official Extension Package Development Guide:
However, the best way to start making a new widget is to take an existing widget that does something like you want, and modify it. Built in widgets exist at
TomcatRoot\webapps\Thingworx\Common\thingworx\widgets
Here's a very brief guide to getting started with that. If you were to want to copy Textbox:
Open the metadata.xml and change the "TextBox" to "MyWidget".
There are two sections in this file. The "ExtensionPackage" section holds metadata for the pacakge (version, vendor, etc.)
The second section , "Widgets" defines the widget files. Change the name of all these files to use your name e.g. MyWidget.ide.js Don’t forget to change name in the “Widget” xml tag too.
Rename all necessary folder and files, replacing "TextBox" with "MyWidget"
Open the both .js files and change the definition in each to reflect "MyWidget"
In the ide file, change the icon path "widgetIconUrl" and the "name" property.
Select the "ui" folder and the metadata.xml file and package them both into a new zip file. This file should import into Thingworx.
I would suggest searching for or asking this question in the PTC IoT Community, which is much more active for Thingworx developers than StackExchange.
UPDATE: The latest documentation for ThingWorx 9 Extension Package Development Guide can be found here

How to build with a custom eglfs cursor atlas?

I'm trying to change the eglfs mouse cursor graphics for my embedded linux QT application (QT5.5). I have the new cursor atlas PNG and the new JSON descriptor file, but the documentation is rather vague:
".. a custom cursor atlas can be provided by setting the QT_QPA_EGLFS_CURSOR environment variable to the name of a JSON file. The file can also be embedded into the application via Qt's resource system."
I'd prefer to keep everything within the resource system if possible but I can't work out how to do it.. do I need a specific qrc file containing the path to the JSON file? I assume that the PNG file would also need to be added as a resource so that it gets built into the application?
If adding it via the resource system is a bad idea where's the correct place to set the QT_QPA_EGLFS_CURSOR environment variable? I'm currently specifying the platform on the command line via "-platform eglfs"; will this be ok or will I need to set the platform to eglfs in the build?
After much trial, error and digging around I have found the solution that I was looking for within the resource system.
Create a new resource file called "cursor.qrc", the contents of which needs to be two lines:
path/to/your/custom-cursor-atlas.png
cursor.json
The first line (path to your cursor atlas) must be relative to your resource directory.
You then need to put the JSON file (contents as described in the documentation) in the root of your resource directory. It must be called "cursor.json", and its image location line must must match the location in your new resource file and be of the format:
"image": ":/path/to/your/custom-cursor-atlas.png",
This will then include your cursor atlas in resources, and Qt will find it when your application starts.
Run time solution example:
export XDG_RUNTIME_DIR=~
export QT_QPA_EGLFS_CURSOR=~/cursor.json
In the cursor.json:
"image": "cursor.png",
Put your custom cursor.png atlas into your home dir (~) then run the Qt app from there.

IntelliJ IDEA expand/collapse tags in *.iws, *.ipr and *.iml files

I'm trying to get IDEA to recognize its own workspace, project and module files as XML files so that I can expand/collapse tags. However, when I try to modify the XML file type to add any of those extensions, IDEA complains that those are reserved. Now, if it knows about those extensions, why doesn't it let me expand/collapse tags? Is there a way to do that?
The support for tag expand/collapse is just not there, because these files are not supposed to be edited (or frequently viewed) by people, it's just some internal information. If you have a specific use case when it's really needed, please describe it in a new issue at http://youtrack.jetbrains.com/dashboard

Save the modified Property file inside WAR deployed on server

We are trying to use Apache PropertiesConfiguration in our project using JSF and JBoss.
My property file is located inside a package say demo.prop by the name of Prop1.prop
Inside my WAR file the same is present under /WEB-INF/classes/demo/prop/Prop1.prop
Using
FacesContext.getCurrentInstance().getExternalContext().getResource("/WEB-INF/classes/demo/prop/Prop1.prop");
I am able to fetch the property file. So when I try to extract a string from the property file using
PropertiesConfiguration pc1=new PropertiesConfiguration(a);
String s1=(String)pc1.getProperty("User_Name");
I am able to get the proper string. Using set property method I am able to set the property also.
pc1.setProperty("User_Name", "hardcodedString");
But I am not able to save the FILE back to this location. No matter what I do it is not able to save the file using pc1.save.
Can anyone please try to tell me how can I save this file back to its original location so that the changes done in the property file remain as it is.
Modifying the WAR file is a bad idea (for example, some web servers may notice the file
modification an redeploy your app, there may be problems when the server explodes the war on deployment etc.)
I would suggest applying an alternative approach - some possibilities are:
Place the properties in a database table, so they can be easily modified
Use an external properties file for overriding your "Prop1.prop" file settings. You can pull this off for example as follows. Assume that the default property values are bundled in your WAR and the modified values are saved to some other path, which is defined using a system property - let say it's called CONFIG_LOCATION. Now after loading your properties from the bundle you read them also from this external "overrides.prop" file - this overrides your defaults from "Prop1.prop":
PropertiesConfiguration pc1=new PropertiesConfiguration(a);
try(FileReader propReader = new FileReader(System.getenv().get("CONFIG_FILES") +"/overrides.prop"){
pc1.load(propReader);
}
When you need to save changes, you do that to "overrides.prop" - this will save all
the properties, not only the changed ones, but that should have no negative effects.