The order that your queries are executed will have an effect on this behavior.
Your prompted condition objects are being sorted alphabetically within each individual query.
Assume 2 prompted condition objects that display the prompts
1. Enter prompt1 stuff:
2. Enter prompt2 stuff:
So if you had a 2 data provider report and query 1 used only prompt 2 and the query 2 used both prompt 1 and prompt 2, you would see:
2. Enter prompt2 stuff:
1. Enter prompt1 stuff:
This is because the report engine processed the prompts in query 1 first and the position for prompt 2 was set to be the first position at that point. When it processed the query 2, it saw that prompt 2 was a duplicate and did not repeat it. More importantly, it added the non duplicate prompt 1 after prompt 2 and messed up the sorting order we were hoping for.
If you shift the second data provider to the left, so that is executes first you then see:
1. Enter prompt1 stuff:
2. Enter prompt2 stuff:
This time it processed prompt 1 and 2 from query 2 first and positioned them in the desired alphabetical order. Next it processed query 1 and sees that prompt 2 is a duplicate and did not repeat it.
So the moral to ths long winded story is you might be able to get what youre looking for by reordering your queries.
If you cant get the desired result through a combination of query order and/or extended prompt syntax, one last trick would be to create a new dummy data provider that is positioned as the first query, it should contain all the prompts used by the other data providers. Since it is executed first the prompts should then fall in the desired alphabetic order. We don’t care about any data this query returns so the trick here is to design the dummy query so that has no/low impact on your database and your report execution time. There are a lot of ways to do this including adding an impossible to meet condition (i.e. 1=2) or limiting the number of rows the query is allowed to return. The best method really depends on the underlying database. Not all that neat and tidy, but it would work.
Regards,
Scott Emmons
Scott Emmons (BOB member since 2002-09-12)