If you check my post at this thread:
There is a sample application to make selections on a field one by one and export a chart to word.
Inside the For-Next structure you could include a different export method according to your need.
Tell if you need some help to understand or adapt it.
I presume that you want to use STORE to a TXT (csv) file in the script. The only way I see is to load each part you want to export to a second table with a filter where clause:
FROM xyz.qvd (qvd)
Where dimension = 'DIM1';
STORE temp INTO dim1export.txt (txt);
DROP Table temp;
// repeat for DIM2 to DIM3, you could also have a loop here
So, a combination of what you BOTH said seems more appropriate. Part of that has to do with my explanation of the issue, and expected output I'm looking for:
1. Erich - Your FOR loop looks like it checks for all possible values in a given field, and moves through them until all of the possible field values have been dealt with. This portion is exactly the kind of behavior I was looking to do...
2. Ralf - You actually had the exact output and concept I was looking for (where Erich was doing more of an immediate export to Word or similar app).
Now, I need to figure out a way to combine the two concepts... I think with this I should be able to collectively put it together. If I come up with an exact step-by-step walkthrough, I will most certainly come back and post it.
Just going to take some time, tweaking, and a little more referencing of the scripting language capabilities.
Nope, I'm actually stuck...
So the biggest issue here is that we need to be able to implement the variables in the filenames - in otherwords, as it is pushing through the different possible dimensions (say integers 1-3 are the values possible), it should add that as a portion of the filename.
1. Look at QVD, and for all rows where site_id = 1, save to SITE_INVENTORY_1.CSV
2. (loop assumed) Look at QVD, and for all rows where site_id = 2, save to SITE_INVENTORY_2.CSV
... the syntax that you referenced in the other post Erich didn't seem to apply easily to what I was trying to do because of this small detail.