Run a report using conditions based on results of a query

I would appreciate some help with this problem I have.

I am trying to run a report that would be based on some simple conditions - date, shift, product - nothing complicated. This report already exists and I used prompted conditions in defining the query. When the report is run, the prompts come up and the values the conditions are to be based on are entered.

I need to adapt this report to first display an entry box which would accept an 8-digit code. Upon submission, the 8-digit code will then be decoded using a look-up table to return the values to then be used as conditions to run the already existing report.

I am not sure how to accomplish this. Do I need to use VBA, a stored procedure or are there other options.

I’d really appreciate some help here. I could provide some more information if this explanation is not detailed enough.

Regards.


Hovana (BOB member since 2004-06-30)

VBA can work. But be aware that if you go that route, you will not be able to use the report from Webi. Any interactive coding that you do requires that the application run in the foreground. Webi runs all busobj.exe processes in the background.


Dave Rathbun :us: (BOB member since 2002-06-06)

Hi,
What i understand is that you want to ask the user for a 8 digit code and based on this code get the date shift and product and then use these as conditions to get some other values.
What you can do is create one dataprovider which selects date,shift and product (i.e. the result objects) and in the conditions put a prompt for the code. So that you will get the 3 values for the specified code.
Then in a second dataprovider select the other objects that you want and in the condition you specify that you want to select result of other query.
Like suppose you drag product to the condition part, then select the equal to operator and when you come to the operand you will see “Select Query Results” on the left. Select that. It will ask you which query (dataprovider) and which object you want. You can select the first query and the object product in that. Similarly the others

 Hope this is helpful

Akshay


akshay :india: (BOB member since 2004-02-05)

Thanks Guys for your help and advice.

I had to do an upgrade to 6.1a to use that option with my conditions in the query panel.


Hovana (BOB member since 2004-06-30)

Ahhh Nooooooo :blue: …why did you not go with v6.1b instead :confused:


Andreas :de: (BOB member since 2002-06-20)