Jump to content
  • Domain model - bulk update properties


    jzhou_1

    Question:

    The customer is in the process of creating a domain model. Now, by default all my nummercial fields are seen as "measures", which is not always what he would like, so he need to update quite a lot of properties. 

    Is there a way in the Domain Designer to select multiple fields and then mark them as "Dimension" instead of "Measure"? 


    Solution:

    There is another way to bulk update this setting by manual edit the domain definition. 

    1. Login JasperReports Server Web UI, navigate to View->Repository 

    2. Locate the domain you need to modify then right click on it 

    3. Select "Export", it will save it to a export.zip file 

    4. Open the zip file and find the schema definition file "schema.xml.data" 

    5. Edit the file by text editor and add the following property into the item definition: 

      dimensionOrMeasure="Dimension"
      

      For example,

      Original: 

      <item description="store_id" 
            descriptionId=""
            id="store_id" 
            label="store_id"
            labelId=""
            resourceId="public_employee.store_id" />
      

      New: 

      <item description="store_id"
            descriptionId=""
            dimensionOrMeasure="Dimension"
            id="store_id"
            label="store_id"
            labelId=""
            resourceId="public_employee.store_id" />
      
    6. Save the file "schema.xml.data" and overwrite the existing file inside the export.zip 

    7. Import this export.zip back to the server to overwrite the existing domain 

    8. Open the domain designer "Display" tab to confirm the changes. 

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...