Jump to content
  • Jaspersoft Studio JsonQL subdatasource shows too many rows


    Stefan.vanMarle
    Assigned User narcism
    CategoryBug report
    Component: 36916
    PriorityUrgent
    ReproducibilityAlways
    ResolutionWorks as Designed
    SeverityCritical
    StatusClosed
    Versionv6

    I use TIBCO Jaspersoft Studio 6.20.5.

    I try to make a table with on the left side assets and on the right side liabilities.

    Bug: Jaspersoft shows from every branch of the tree the first element and after that it shows all elements of the tree (what is desired)

     

    I get:

    Checking account 1

    Investment account 1

    Pension account 1

    Savings account 1

    Checking account 1

    Investment account 1

    Investment account 2

    Investment account 3

    Investment account 4

    Investment account 5

    Pension account 1

    Pension account 2

    Savings account 1

    Savings account 2

     

    Instead of:

    Checking account 1

    Investment account 1

    Investment account 2

    Investment account 3

    Investment account 4

    Investment account 5

    Pension account 1

    Pension account 2

    Savings account 1

    Savings account 2

     

    I use in my subDatasource for the table "..*", so only all the elements should be showed and not first the first elements of the branch and after that all the elements of the branch.

     

    In the attachment you can find the code for it



    User Feedback

    Recommended Comments

    Changed Resolution from Open to Works as Designed

    Changed Status from New to Feedback Requested

    Changed Assigned User from - to @narcism


    Hi,In essence, what you describe is expected.The ..* query will pick up anything starting from the JSON key that it is applied on, meaning that it will produce arrays of nodes.And each node in that array could be: also an array, an object or a plain value. So in your case it first picks up the arrays containing your desired objects and then those objects. You need to either apply filters to your query - something like: ..*(@isObject) - or redesign you query to land on the desired keys and then go back up a level.Maybe the sample documentation here(https://jasperreports.sourceforge.net/sample.reference/jsonqldatasource/index.html#jsonql) could be of use.Hope this helps,Narcis
    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...