Let me try to explainā¦
I have made a Universe and some reports on that Universe.
The users who use the reports can see data only for their branch (we have set some restrictions on the Supervisor).
In each and everyone of the reports there is a multi prompt.
One of the prompts is the āāVendor Code/Nameāā and in the LOV file of this prompt there are over 1000 values.
The problem is that some users want to run the reports for less than 100 Vendor Codes and some of them want to run the reports for all the Vendor Codes, which is something you know very well that it cannot be done by BOā¦
In order to solve thiw problem, i tried to find a solution similar to the code that i posted before but i didnā t have any luckā¦
Then i tried to do this:
I created an new object in Designer where ther was only one value, āāAll Vendorsāā.
I made a prompt of this object, which had only one value in the LOV file.
I tried to run the reports like a restricted user. I chose āAll Valuesāā in the first prompt and the values that i wanted in the āāVendor Code/Nameāā prompt and it worked just fineā¦but it didnā t when i tried to run the report as an unrestricted user, with all the Vendor Codes because i had again to insert all the valuesā¦ the code of my SQL was the folowing:
SELECT
TABLE1.DWAR_ACODE,
TABLE1.DWAR_DESC,
TABLE1.BAS_EPITOKIO,
TABLE1.SPREAD,
TABLE1.DWAR_EFDT,
TABLE2.AGREEMENT_DESC,
TABLE1.DWAR_LNFAC,
TABLE3.PERIGRAFH_VENDOR
FROM
TABLE1,
TABLE2,
TABLE3
WHERE
( TABLE2.AGREEMENT_TYPE=TABLE1.AGREEMENT_TYPE and TABLE2.VENDOR_CODE=TABLE1.VENDOR )
AND ( TABLE3.VENDOR_CODE=TABLE2.VENDOR_CODE )
AND (
TABLE3.PERIFEREIA IN @variable('Prompt1')
AND TABLE3.PER_KAT_SYNERGAS IN @variable('Prompt2')
AND TABLE3.PER_KENTR_SYNERGAT IN @variable('Prompt3')
AND TABLE3.PERIGRAFH_VENDOR IN @variable('Prompt4')
AND TABLE2.AGREEMENT_DESC IN @variable('Prompt5')
AND TABLE1.DWAR_EFDT BETWEEN @variable('Prompt6') AND @variable('Prompt7')
AND TABLE1.DWAR_ACODE IS NOT NULL
AND 'All Vendors' = @variable('Vendors All')
)
I tried to fix the problem changing the AND to ORā¦
It didnā t work eitherā¦
The SQL code was the following:
SELECT
TABLE1.DWAR_ACODE,
TABLE1.DWAR_DESC,
TABLE1.BAS_EPITOKIO,
TABLE1.SPREAD,
TABLE1.DWAR_EFDT,
TABLE2.AGREEMENT_DESC,
TABLE1.DWAR_LNFAC,
TABLE3.PERIGRAFH_VENDOR
FROM
TABLE1,
TABLE2,
TABLE3
WHERE
( TABLE2.AGREEMENT_TYPE=TABLE1.AGREEMENT_TYPE and TABLE2.VENDOR_CODE=TABLE1.VENDOR )
AND ( TABLE3.VENDOR_CODE=TABLE2.VENDOR_CODE )
AND (
TABLE3.PERIFEREIA IN @variable('Prompt1')
AND TABLE3.PER_KAT_SYNERGAS IN @variable('Prompt2')
AND TABLE3.PER_KENTR_SYNERGAT IN @variable('Prompt3')
AND TABLE3.PERIGRAFH_VENDOR IN @variable('Prompt4')
AND TABLE2.AGREEMENT_DESC IN @variable('Prompt5')
AND TABLE1.DWAR_EFDT BETWEEN @variable('Prompt6') AND @variable('Prompt7')
AND TABLE1.DWAR_ACODE IS NOT NULL
OR 'All Vendors' = @variable('Vendors All')
)
I cannot thin anything elseā¦
Any suggestions
dapostolopoylos (BOB member since 2005-06-02)