Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create Multiple Reports Dynamically

I have some User Specific records like .... User Name, Address, DOB etc.

We have requirement to show single or multiple report based on each USER selection.

For example:

If I select 1 User I should see user details in once container >>>> text box.

If I select 2 Users I should see 2 container having each 2 user details......and so on.

Containers can be aligned one below the other.

QlikView Experts Plzzzzzzzzzzzz Help.

1 Solution

Accepted Solutions
jvitantonio
Specialist III
Specialist III

See the attached QVW

View solution in original post

7 Replies
jvitantonio
Specialist III
Specialist III

Hi,

You can hide/show the container or any object with the Show Conditional option in the Layout tab.

you can then put there something like this "If(myField = 'User1', 1,0)"

I hope this helps.

JV

Anonymous
Not applicable
Author

Hi,

Yes this will help for displaying container.

But dynamically fetching data in each container is an issue.

for example:

in filter if we select 1 or more user - (name, address, DOB) . How to display data in different containers.

Thanks,

Shree

jvitantonio
Specialist III
Specialist III

See the attached QVW

Anonymous
Not applicable
Author

Awesome. That will work.

=substringcount(concat(User,'*'),'User1')

In real scenario we have many users ..... can we pass User1 & User2 & User3....... too dynamically

Anonymous
Not applicable
Author

The easy way is to use straight table with columns User Name, Address, DOB...  One line is one "user report".  I'd use this one.

There could be many hard ways.  An example od a hard way is to pre-build multiple (but fixed) number of "reports" in any form or shape.  Locate them one below the other.  Make 1st one visible if at least one user selected, 2nd - if at least two users selected, etc.
Use some logic in each report so you show data for user one in 1st report, user 2 in 2nd, ...  For example, use FirstSortedValue() function:


1st.
User Name: FirstSortedValue("User Name", USERID, 1)
DOB: FirstSortedValue(DOB, USERID, 1)
...
2nd.
User Name: FirstSortedValue("User Name", USERID, 2)
DOB: FirstSortedValue(DOB, USERID, 2)
...

I hope you can figure out from here.  But my primary recommendation is to use table.

Not applicable
Author

Shree,

In fact, there are two questions

1) Displaying or hiding the text boxes

I think you can show it, conditionnaly, in the Layout tab

  GetSelectedCount(Client) >=N (where N is your Nth box)

2) Displaying the content

In your model, if you do not have duplicates (each client has his own details once in a table)

you can use concat() and subfield() functions

concat(Distinct ClientAttributeN, '|', Client) : will create a string of the attribute N for the clients, ordered by Clients (and not by the attribute. The fields are separated with the pipe '|' or whatever that cannot be in the field values

substring(string, '|', N) will return the the Nth field of the string

=> so by encapuslating both

substring(concat(FieldAttributeN, '|', Client), '|', 2) : you will get the attribute of the second client

Fabrice

Anonymous
Not applicable
Author

Try attached.  Make selections in USERID box, and see how "reports" react.