Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

User input for SQL Server 2008 R2 Reporting

$
0
0

I was trying below report which was OK. What I wanted collection value e.g. '5000000C' is to be as user input.

************

SELECT arp.DisplayName0, sys.User_Name0, sys.Netbios_Name0, arp.Publisher0, arp.Version0
FROM v_R_System sys
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
JOIN v_FullCollectionMembership fcm on sys.ResourceID=fcm.ResourceID

WHERE
 fcm.CollectionID = '5000000C'
AND
( arp.DisplayName0 IS NULL OR (
arp.DisplayName0  NOT LIKE  '%iSeries%'
AND  arp.DisplayName0  NOT LIKE  '%Adobe%'
))
AND 
( arp.Publisher0 IS NULL OR (
arp.Publisher0   NOT LIKE  '%Adobe%'
AND  arp.Publisher0   NOT LIKE  '%Microsoft%'
))
ORDER BY DisplayName0, Version0
*******************************

I have got separate query to get the valu of Collection field:

********************************

begin
 if (@filterwildcard = '')
  SELECT DISTINCT CollectionID, Name FROM fn_rbac_Collection(@UserSIDs)  Where CollectionType = 2 ORDER BY Name
 else
  SELECT DISTINCT CollectionID, Name FROM fn_rbac_Collection(@UserSIDs) 
  WHERE CollectionID like @filterwildcard and CollectionType = 2
  ORDER BY Name
end

********************************

If I click values pop up list should come from 2nd query. based on the value 1st query will display.

How can I pass values from the 2nd query to the 1st query. Please help.


Viewing all articles
Browse latest Browse all 20764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>