in a nutshell, you'd need to do a lot of programming in VBScript macros to develop a dynamic screen like this one. If you really want to do it, download "QlikView Explorer" as an example - it allows building dynamic "tables" with selected fields. You can get some ideas there.
I'd argue the advantages of such approach alltogether - QlikView is already a "high-level" development tool. You are trying to develop a dynamic "screen generator" on top of the existing "screen generator"...
I don't think you'll eve be able to save the amount of time that you need to invest up-front to develop something like this...
just my opinion,
thank you for the response.
I spent a lot of time to understand the software capabilities because this part of the program is part of my big project for my graduate degree so I need to solve this.
I understand that I need to do a programming in VBs macro and I've a lot of ideas,
but I've some problem - the menual don't cover all the basic syntax for qlikview object , and I need to pass one by one in the example to understand the vb script.
I do know how to program in VB but I don't understand the hirarchy / the functions that qlikview covers.
do you know if there a menual/internet site only for qlikview vb functions/objects
Trying a way to load the apriory unknown tables from the database using the metadata table "table_name", and keeping all linked. The table "columns" here is not necessary, but I keep it for "completeness", just in case:
LET NumOfTables = NoOfRows('tables');
for T = 1 to NumOfTables
LET TableName = peek('table_name', $(T)-1, 'tables');
'$(TableName)' as table_name,
I think it eliminates most of the possible macro troubles.
As for the help on VB macros, I don't think there is anything more complete than APIGuide.qvw, plus this forum. And maybe some blogs, links to which also can be found here on this site
The macro will be needed for presenting the tables "dynamically" on the screen. I wasn't even addressing the load process.
Danny - APIGuide.qvw is indeed the best reference of all QlikView APIs. It's installed as a part of the "Complete" installation under \Program Files\QlikVIew\Documentation.
Oleg, I aslo understood that the macro should be able to present the table dynamically. I'm suggesting the data model that can make the macro maybe two orders of magnitude simpler, no any conditional branching. Without going into the details (at least for now), here is the possible way to go:
1. Front end contains a listbox with the name of the data tables. Property - only one field is alwyas selected.
2. Front end also contains a straight table with the table fields as dimensions, and one expression which is
- independent on selected table.
(It could expression =1)
3. User selects another table name in the list box. This action triggers the macro.
4. Macro removes all dimensions from the straight table and adds the fields of the selected table as dimensions.
It shouldn't be a complex task. Not sure though if it covers all the requirements.
thanks for the help
the code was very helpful for the script understanding.
also your last post was given me some idea to do it. (I need to get dirty with VB..... :-))))) )
now I search for deep understanding the qlikview VB by review the APIguide.qvw
do you think that for complex drill-down in the data (e.g. the field selction as I mentioned in my original post) I should do exact as you told to do with the tables?
if you an idea/example that you know I will glad to know.
thanks again :-)
Oleg , thanks for mention the APIguide.qvw , it realy give me a big insight on qlikview automation
When you say that the "code was very helpful for the script understanding", it tells me that I was driving in the wrong direction. This is not a "normal" script for the data analisiys application, you can call this script rather a "database tables viewer". It reads the metadata, and based on it loads all actual data tables linked to the list of tables. I thought that this was what you wanted.
When you build a business inteligence application, database structure is one of the inputs, a part of the requirements. Based on the business part of the requirements, you decide what to load from the database. This decison cannot be automated because the business requirements gathering cannot not be automated. A "normal" script will may look more like this:
As for the macros, they are optional part of the QV aplications. They certainly can be useful, often necessary, but it's a good practice to aviod macros whenever possible.
Please take a close look at the tutorial and the QV examples that come with the installation (if you use "complete install").
I didn't look for driving you guys in a wrong direction.
my primary goal is to make a program that can get any database and analyse it for the data manager.
I need to take the database and explore every table and make some manipulation on the fields and then to make a great presentation.
your code was very helpful and I'm using it in my code because I need to load a lot of tables (depend on the database) and this part of code can load for me all the tablse in the database in a short way and not like the long way like you write in your last post.
now, I need the macro for taking the tables fields and show them to the user when he press on one of them.
in the main GUI screen I want that the user can select tables/fields in the table and get the data + I want to show him som graph chart that showing all the mnipulations that I did to the database. (all the manipulations were added to some QVD filse and read by QV when I runing the script.
I will glad to here about examples that maybe going to this direction so I could learn from them and become an "expert" in QV.
If this is really what you need - see attched example. It's using excel as data source, which is attached too. Hope it will help.
dynamic.zip 116.3 K