Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Reporting Services 2000

SQL Reporting Services 2000

Scheduled Pinned Locked Moved Database
questiondatabasesharepointhelptutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xfitr2
    wrote on last edited by
    #1

    I have a report that I created that uses parameters. One of the parameters queries data from a table and inserts it into a combobox. My question is: How do I insert a wildcard into a queried parameter? For example if the query returns a list of teams how can I add a wildcard to that dataset so I can also have the option to pull of all the teams? Any help would be appreciated. -Garrett

    X 1 Reply Last reply
    0
    • X xfitr2

      I have a report that I created that uses parameters. One of the parameters queries data from a table and inserts it into a combobox. My question is: How do I insert a wildcard into a queried parameter? For example if the query returns a list of teams how can I add a wildcard to that dataset so I can also have the option to pull of all the teams? Any help would be appreciated. -Garrett

      X Offline
      X Offline
      xfitr2
      wrote on last edited by
      #2

      O.K. So I decided to create a stored procedure that takes a sql statement as a parameter and then adds a wildcard to the first row. This seemed to work fine. Code is below: CREATE PROCEDURE sp_add_wildcard @sql nvarchar(1000) AS create table #paras ( label nvarchar(255), value nvarchar(255) ) insert into #paras (label,value) values ('(ALL)','%') execute('insert into #paras (label,value) ' + @sql) select * from #paras drop table #paras GO

      M 1 Reply Last reply
      0
      • X xfitr2

        O.K. So I decided to create a stored procedure that takes a sql statement as a parameter and then adds a wildcard to the first row. This seemed to work fine. Code is below: CREATE PROCEDURE sp_add_wildcard @sql nvarchar(1000) AS create table #paras ( label nvarchar(255), value nvarchar(255) ) insert into #paras (label,value) values ('(ALL)','%') execute('insert into #paras (label,value) ' + @sql) select * from #paras drop table #paras GO

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #3

        Usually in my RS datasets, I do a union SELECT 'All' as label, '%' as value union SELECT label, value from myLookupTable

        Michael CP Blog [^] Development Blog [^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups