07-17-2015 11:34 PM
Hey all -
Ok, I actually created a nice process flow that contains a few queries. I basically take a table of data, prompt the user for a value that they want to search (there are two choices) and allow them to choose a date range. These two choices - prompted value and prompted date range - are the only queries. Now, since I have two queries that are conditional on whether the user choices choice A or B, I have two reports that are visible in my process flow (**only 1 should show due to the user having to choose between A or B in the beginning**). The process flow works and the reports are great, exactly the way I want. I have one problem. When I run the process flow for choice A, the report runs but it doesn't pop up automatically. I know it runs because I can view it in the process flow and change around the date range from the prompt. The only problem is that it doesn't physically pop up on my screen. When I run choice B, everything pops up just fine - like it should.
With all of that said, is there a setting I am forgetting to modify so that when I run the query, choose option A at the prompt, etc., it will auto pop-up the report that uses the option A flow? Like I said, it works fine when I choose choice B. Just to re-iterate: the report runs perfect and i get the report pop-up for choice B; for choice A, the report runs perfect but it doesn't physically show the report pop up on my screen (only in the process flow).
Thanks for the help.
07-19-2015 10:04 AM
Do you take any action to run only one or the other streams of the process flow, or do all of the tasks run regardless of which option your users selects?
If you do run only one stream, how do you force EG to conditionally run the tasks?
07-19-2015 12:11 PM
I set a condition on one of the queries (Add a Condition). Basically, if they choose option A, then it runs through A's process flow. If they choose B, it runs through B's process flow. Like I stated before, it works b/c I can see the report being generated for option A (and I confirm it is correct by clicking into it) but it doesn't automatically pop up on the screen like normal. If you choose option B from the prompt, it runs fine and automatically pops up.
07-20-2015 10:13 AM
I was able to replicate the issue. I think the cause is that EG will only open the "last" task that was run. In your case, with Option B, that stream is actually the last set of tasks. But when you run it for A, EG is actually running some code for the B tasks, which decides not to "execute" the tasks. This makes the B stream the last tasks executed, and there's no output, so EG doesn't automatically open anything.
I can suggest a couple of (ugly) workarounds. First, if you're comfortable coding in SAS, if you were to create this stream as a single SAS program, all of the run / don't run decisions would be internal, and there would always be a report to open.
Second, if the nature of your A and B reports are such that you can create them as datasets in your two streams, and then use one task to print them, you can have each stream create a dataset, with the same name, and then link both streams to a common task that prints the needed data. Unfortunately, the site won't let me upload a picture.
Neither of these is particularly efficacious. I suggest leaving this as unanswered; there's some pretty high-powered SAS guys who follow these posts, and one of them will probably have a better solution.