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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
rzenere_avvale
Partner - Specialist II
Partner - Specialist II

How can I alter field's selection from vb script?

Hi,

I'm pretty new to QlikView and I need a bit of help.

I need to print some reports with many different field's selections, so I was looking to dynamically modify the fields' value (maybe using a multidimensional array and looping on an index? I don't know yet) through VB script (I'll need to make this work from batch, so no buttons).

I'm currently stuck with the field selection. I know how to select it, but I don't know how to modify the value in the selection after I read it.

Is there anybody that can help me?

Edit: I found how to cycle on different fields, but then I discovered that I need not only to modify the selections, but also the "banding" of the single page of my report (which will be printed as a PDF) always from script. I took a look on the API (I'm working on QV 10 SR3), but the only thing I came up with is how to read the current banding value, not how to modify it. Any idea?

11 Replies
rzenere_avvale
Partner - Specialist II
Partner - Specialist II
Author

Hi Marcus,

I still don't get how I could avoid printing a single page for every "selection"/case on the matrix. If I understood correctly, I cannot "open a report", cycle into it, and the "close it" and send it to the printer... Can I?

Regarding the NPrinting, I was told that the customer which requires those reports are litterally "out of support" and that suggesting NPrinting for them is not possible...

marcus_sommer

You will need to create this extra control-informations which contains which values belonged together, should be skipped or needs another report-id or anything else. If you want only group or skip some values you could create this as one or several additionally field(s) within the script like:

...

if(match(FIELD, 1, 2, 3, ...), 'Grouped', match(FIELD, 'a', 'b', 'c', ...), 'skipped', 'single values')) as PrintFieldCluster

...

and used then those fields to filter your data and looped through for your printing.

- Marcus