Query a dataset in MS SQL Server Report Builder and get splitted output of one of the fields

Hi experts,
I have a dataset in MS SQL Server Report Builder containing some rows like the following:
FIELD-1
FIELD-2
FIELD-3
1
efgh
xjhg[R]ztazutsuz[R]9
2
abcd
1234[R]abcd[R]5678
What I need is:
FIELD-1
FIELD-2
FIELD-3
1
efgh
xjhg
1
efgh
ztazutsuz
1
efgh
9
2
abcd
1234
2
abcd
abcd
2
abcd
5678
Can this be done?
I'll be very happy when one finds a solution.
Kind regards,
Peter

try like this..
Declare @ta table ([FIELD-1] int, [FIELD-2] nvarchar(100), [FIELD-3] nvarchar(100))
insert into @ta
select 1, 'efgh', 'xjhg[R]ztazutsuz[R]9' union all
select 2, 'abcd', '1234[R]abcd[R]5678'
select t.[FIELD-1],t.[FIELD-2], a.b.value('.','nvarchar(100)') as [FIELD-3] from @ta t
Cross apply
(select cast('<R><C>' + replace(t.[FIELD-3],'[R]','</C><C>')+ '</C></R>' as xml) as XStr ) x
Cross apply x.xstr.nodes('R/C')a(b)
Thanks,
Saurabh 
http://www.linkedin.com/in/sbhadauria http://www.experts-exchange.com/M_6313078.html

Similar Messages

  • SQL Server Report Builder Numeric Field Formatting

    I am creating Reports in SQL Server Report builder.
    When I set format of any number fields, in design it is displaying sample value.
    For e.g. If I set format 0.00 to one numeric field, it started to display 12345.00
    I have 10-12 fields in design, it caused very much confusion.
    Is there any solution to change this?
    When I open report in Visual Studio, it doesn't display like that.
    Check Following screenshots:
    In Report Builder:
    In Visual Studio:

    Hi Harsh10,
    If I understand correctly, there are two placeholders in each textbox in the report. You want the second placeholder which contains numeric field to format as 0.00. If in this scenario, we can refer to the following steps:
    Right-click the second placeholder which contains numeric field in each textbox to open the Placeholder Properties dialog box.
    Click Number in the left pane.
    Select Number with Decimal places ‘2’ in the Category drop-down list.
    Reference:
    Formatting Text and Placeholders (Report Builder and SSRS)
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Adding parameter to a MySQL query in MS SQL Server Report Builder

    So I have a MySQL DB connected to MS SQL Server Report Builder via ODBC connector. Everything is fine, I can execute queries and put the fields into report.
    But I can't add an parameter to the query.
    Example query:
    SELECT column1, column2 FROM table WHERE column3 = (@parameter1)
    The result set is just empty. I think the problem is that I'm using MySQL and not MS SQL. Any suggestion?

    Hello Alan,
    Named parameters like @param works with SQL Server / .NET data provider, but not for OleDB, here you have to use the question mark instead
    SELECT column1, column2
    FROM table
    WHERE column3 = ? and column9 = ?
    When you assign the report parameter to query parameter you have to take care about the order of used ? in query
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • SCCM 2012 SQL Server Report Builder Error

    I am trying to create a report with SQL query on SCCM 2012. I get the below error.
    TITLE: Microsoft SQL Server Report Builder
    An error occurred while executing the query.
    The SELECT permission was denied on the object 'v_GS_OPERATING_SYSTEM', database 'CM_C01', schema 'dbo'.
    ADDITIONAL INFORMATION:
    The SELECT permission was denied on the object 'v_GS_OPERATING_SYSTEM', database 'CM_C01', schema 'dbo'. (Microsoft SQL Server, Error: 229)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3000&EvtSrc=MSSQLServer&EvtID=229&LinkId=20476
    BUTTONS:
    OK

    Does your account have accesses within SQL? Bases on the error message I'm guessing not.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Sql server reporting services and coldfusion

    I want to using sql server reporting services ,and create report after i want to call this reports in my coldfusion page.is it possible

    Hi,
    Please try setting the credentials of the datasource.
    1. Double click and open the datasource in your project.
    2. Click on the credentials tab, and click on option button 'Use this username and password'
    3. Enter the username and password to connect to the datasource
    4. Deploy or upload the datasource to the report server and try accessing the reports.
    Hope this helps.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • Migrate VS SSDT Reporting Project to SQL Server Report Builder?

    In the past, I have developed SSRS reports using Visual Studio (BIDS/SSDT). Unfortunately, a company server migration has made it impossible for me to deploy my reporting projects using that devlopment environment, so it appears I have to resort to Report
    Builder now.
    I see that the SQL Server Reporting Services web app has an "Upload File" menu item.  However, it's not clear to me how these would then be translated into a Report Builder project.  I've heard that the SSRS project-building
    capabilities of Visual Studio go considerably beynd those of the Report Builder in SQL Server.
    What I'd like to know is: Can I develop a Reporting Services project in Visual Studio and then migrate it to Report Builder via upload? If so, what are the steps to accomplish this, and what, if any, are the drawbacks?
    - Mark Z.

    Hi Mark Zudeck,
    As per my understanding, you developed SSRS reports with report designer, now you could not deploy the reports to report manager, and you want to open the projects with report builder. If that is the case, please refer to the following steps:
    On the Start menu, click All Programs, and then click Microsoft SQL Server Report Builder.
    To create a new report, click the SQL Server icon in the upper left-hand corner of Report Builder, and then click New.
    To open an existing report stored on your local machine or a report server, click the SQL Server icon in the upper left-hand corner, and then click Open.
    If you don’t see the report server in the list of existing servers, close the Open Report dialog box and then click Connect at the bottom of Report Builder to connect to the server.
    For detail information about Report Builder, please refer to the following document:
    https://msdn.microsoft.com/en-us/library/ms159221.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • How to Custom Report using sql server report builder for SCCM 2012 SP1

    Hi ,
    I am new to database, if i want to create a manual report using sql server report builder for SCCM 2012 SP1, what step should i take.
    i want to create a report in which computer name, total disk space, physical disk serial no come together. i already added class (physical disk serial no.) in hardware inventory classes. refer snapshot

    Hi,
    Here is a guide on how to create custom reports in Configuration Manager 2012, it is a great place to start, change to the data you want to display instead.
    http://sccmgeekdiary.wordpress.com/2012/10/29/sccm-2012-reporting-for-dummies-creating-your-own-ssrs-reports/
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • How to query a dataset using custom code in report builder 3.0

    Hi,
    Can anyone please suggest whether it is possible to query a dataset by using custom code in report builder 3.0.
    Thanks in advance.

    Hi Purbasha,
    please see below similar thread:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/9af8f39a-9dc5-49ab-91af-2f64198c8477/ssrs-2008-custom-code-for-database-query
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/440ff5de-1c21-47de-95d8-e4212d6cef6d/dataset-in-custom-code-in-sql-server-reporting-services?forum=sqlreportingservices
    swallow

  • SharePoint 2010 & SQL Server Report Builder 3.0 - HTTP 404 Error

    Hi all,
    Apologies if this post is not in the correct forum. 
    I have recently upgraded my SQL installation on my SharePoint server from Express 2008 R2 to Standard 2008 R2 so I could set up Reporting Services Integration in CA.  Followed instructions I found on web and all appeared to be good.
    Installed Report Builder on my PC and set up a data source to a List I have on one of my site collections - "Test Connection" works fine.  If I then try to create a Dataset using Query Designer, I get the error below -
    "An error occurred when accessing the specified SharePoint list.  The connection string might not be valid.  Verify that the connection string is correct - The request failed with HTTP status 404: Not Found. (System.Web.Services)". 
    I can't even get to a point where I can see any fields from my list.
    I am happy to provide any further information to try and clarify my problem.  Any help would be most appreciated!

    Just an update.  I resolved my issue.  The problem appeared to that when creating the Data Source, I had been adding the URL of the actual list (eg. http://servername/sitename/listname) as the connection string where in fact I should have just
    added the server name and site - eg. http://servername/sitename.
    Hopefully this may help somebody else :-)

  • SQL Server Report Builder Hyperlink Column Not Click-able?

    I have a report with a hyperlink column that works in SQL Report Builder 3.0 desktop, but not on the website where it's shown.
    1. 'Website_Domain' field is the shortened URL (domain) is the
    text seen in the Report column
         (technet.microsoft.com)
    2. 'Website_Url' field is the full length URL which is used in the
    'Go to URL' properties
         (http://technet.microsoft.com/en-us/library/ms159106.aspx)
    ['Website Link' Expression]
    =Fields!Website_Domain.Value
    ['Website Link' Column Properties]
    Action = Go to URL
    Selected URL: [Website_Url]

    Hi pointeman,
    I have tried your scenario on my test environment, but the issue was not reproduced. Please take the following steps as a reference:
    Insert Website_Domain field in the detail row, then type the table header with “Website Link”.
    Right-click the cell which contains [Website_Domain] to open Text Box Properties dialog box.
    Click “Action” in the left pane, select “Go to URL” option with [Website_Url] as “Select URL”. 
    The following screenshot is for your reference:
    If the issue still persists, could you please supply more information about the issue? Such as steps you have taken to add the URL or other else. If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • SQL Server Report Builder 08 R2

    Hi there, so I'm trying to create a report and I need to pull from two datasets. They have the same fields just that one is for production and the other for archive. I've seen the suggestions for lookup but I'm wondering if that is appropriate since I'm
    not trying to include just one field

    Hi JrConsultant15,
    According to your description, you want to return data from two datasets in the report.
    In your scenario, since two tables have two same fields, you could create one dataset instead of two datasets, then join those two tables on query level. So that you could return data in the report from one dataset. The query should look like below:
    select * from table1 join table2 on table1.production = table2.production and table1.archive = table2.archive
    Or you could create two datasets and use Lookup() function to return corresponding value. Since Lookup() function only return one field, if you want to return multiple fields form second dataset, you should use Lookup() function for each field.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Creating an expression to return a yes/no or True/False statement in Ms SQL Server Report Builder

    I am attempting to create a field that returns a True/False value instead of a numeric value. I have a field with the expression =Fields!CreditLimit.Value*.95 this returns a value that is equal to 95% of the value in my Balance field. The issue is I
    don't remember how to turn =IIF (Fields!CreditLimit.Value > *.95, true, false) into an expression that compares the 2 fields and then returns True/False. Can you please help me out?
    Thanks,
    -John

    Hi,
    Try below one:
    =IIF (Fields!CreditLimit.Value *.95>95, true, false) 
    Here you have to define a limit. For Example; When output of Fields!CreditLimit.Value
    *.95 is greater than 95 then True else False. So specify the value according to your requirement. 
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • SQL Server Reporting Services FAQ

    Hi All,
    This thread is a summary of the Frequently Asked Questions on SQL Server Reporting Services. We consolidate them and post here for your reference. If you have any further questions, please kindly start a new thread so that more community members, MVPs, and MSFTs can join the discussion and share their ideas. Thanks for your understanding.
    Part I: SQL Server Reporting Services General Topics
    1. How to migrate SQL Server 2008 Reporting Services to another computer?
    2. How to combine connecting string via parameter?
    3. How to install a 32-bit version of SQL Server 2005 Reporting Services on a computer that is running a 64-bit version of Windows?
    4. Error of EXECUTE permission denied on object 'xp_sqlagent_notify'.
    5. Security consideration for anonymous access to Report Server.
    6. How to create a custom report template in Reporting Services?
    7. Does Reporting Services support horizontal tables which have fixed rows and dynamic columns?
    8. How to reset the page number back to 1 every time the report gets a group break?
    9. How to open the drill- through report in a new browser window?
    10. How to verify the version of SQL Server?
    11. How to use multiple datasets?
    12. How to upgrade report from SQL Server 2000 to SQL Server 2005?
    13. Out of memory error when exporting reports to Excel.
    14. How to improve PDF quality of the report exported in Reporting Services 2005?
    15. How to enable the Select All option for a multi-value parameter?
    Part II: SQL Server Reporting Services SharePoint Integrated Mode Topics
    1. How to deploy reports to SQL Server Reporting Services in SharePoint Services integrated mode?
    2. How to integrate SQL Server Reporting Services and SharePoint Services?
    3. How to refer the reports on the Report Server in SharePoint Services?
    4. How to manage user to view reports in SharePoint integrated mode?
    5. What information is needed when posting questions regarding SharePoint integrated mode?
    6. Is Report Builder available in SharePoint Integrated Mode?
    PLEASE NOTE: Microsoft does not offer formal support for the communities you'll find here. Instead, our role is to provide a platform for people who want to take advantage of the global community of Microsoft customers and product experts. Microsoft may monitor content to ensure the accuracy of the information you'll find, but any information provided by Microsoft staff is offered "AS IS" with no warranties, and no rights are conferred. You assume all risk for your use.
    Microsoft Online Community Support

    1.        Question 3: How to install a 32-bit version of SQL Server 2005 Reporting Services on a computer that is running a 64-bit version of Windows?
    Answer: 
    To install the 32-bit version of Reporting Services on a computer that is running the 64-bit version of IIS 6.0, we can follow these following steps:
    1.       Uninstall the 64-bit version of Reporting Services.
    Note: Side-by-side installations of 32-bit versions of Reporting Services and 64-bit versions of Reporting Services are not supported.
    2.       Run the Dotnetfx64.exe file to manually install the .NET Framework.
    The Dotnetfx64.exe file is in the Tools\redist\2.0 folder on the SQL Server 2005 Setup media. To download the Dotnetfx64.exe file, visit the following Microsoft Web site:
    http://go.microsoft.com/fwlink/?LinkId=70186
    3.       In IIS Manager, click Web Server Extensions.
    4.       In the Details pane, right-click ASP.NET V2.0.50727, and then click Allow.
    5.       Right-click Web Sites, and then click Properties.
    6.       Click the ISAPI Filters tab.
    7.       In the Filter Name column, click ASP.NET_2.0.50727, and then click Edit.
    8.       Replace C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll with C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll.
    Note: The Aspnet_filter.dll file in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ folder is a 32-bit version of the file.
    9.       Click OK two times, and then close IIS Manager.
    10.   At a command prompt, run the following command:
    cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
    11.   Install the 32-bit version of Reporting Services.
    12.   After setup is complete, open IIS Manager, and then click Web Server Extensions.
    13.   In the Details pane, right-click ASP.NET V2.0.50727 (32-bit), and then click Allow.
    To install the 32-bit version of Reporting Services on a computer that is running the 64-bit version of IIS 7.0, follow these steps:
    1.       Enable ASP.NET and IIS before you install Reporting Services.
    2.       Open a command prompt. To do this, click Start, point to All Programs, point to Accessories, right-click Command Prompt, and then click Run as administrator.
    3.       In the User Account Control dialog box, click Continue.
    4.       Copy the following script:
    cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
    5.       In the upper-left corner of the Command Prompt window, right-click the command prompt icon, click Edit, and then click Paste.
    6.       Press ENTER to run the script.
    7.       Install the 32-bit version of Reporting Services. You must apply SQL Server 2005 Service Pack 2 (SP2) after you install Reporting Services in Windows Vista. If you install SQL Server 2005 Express Edition with Advanced Services, you can run SQL Server 2005 Express Edition with Advanced Services SP2.
    For more information, visit the following Microsoft Web site:
    Microsoft SQL Server 2005 Express Edition with Advanced Services Service Pack 2
    http://go.microsoft.com/fwlink/?LinkID=63922
    8.       Reset IIS.
    9.       Configure the report server for local administration. To access the report server and Report Manager locally, follow these steps:
    a.       Start Microsoft Internet Explorer.
    b.      On the Tools menu, click Internet Options.
    c.       Click Security.
    d.      Click Trusted Sites.
    e.      Click Sites.
    f.        Under Add this website to the zone, type http://servername.
    g.       If you are not using HTTPS for the default site, click to clear the Require server certification (https:) for all sites in this zone check box.
    h.      Click Add.
    i.         Repeat steps f and g to add http://localhost, and then click Close.
    10.   This step lets you start Internet Explorer either to localhost or to the network computer name of the server for both Report Server and Report Manager.
    a.       Create role assignments that explicitly grant you full-permissions access. To do this, follow these steps:  
    b.      Start Internet Explorer by using the Run as administrator option. To do this, click Start, click All Programs, right-click Internet Explorer, and then click Run as administrator.
    c.       Start Report Manager.
    d.      Note By default, the Report Manager URL is http://servername/reports. If you are using SQL Server 2005 Express Edition with Advanced Services SP2, the Report Manager URL is http://servername/reports$sqlexpress. If you are using a named instance of Reporting Services, the Report Manager URL is http://servername/reports$InstanceName
    e.      On the Home page, click Properties.
    f.        Click New Role Assignment.
    g.       Type a Windows user account in the following format: domain\user
    h.      Click to select the Content Manager check box.
    i.         Click OK.
    j.        In the upper-right corner of the Home page, click Site Settings.
    k.       Click Configure site-wide security.
    l.         Click New Role Assignment.
    m.    Type a Windows user account in the following format: domain\user
    n.      Click to select the System Administrator check box.
    o.      Click OK.
    p.      Close Report Manager.
    11.   Open Report Manager in Internet Explorer without using the Run as administrator option.
    Microsoft Online Community Support

  • How to show or publish the TFS - SQL Server Reporting Services reports in SharePoint dashboard?

    Hello,
    We have configured SharePoint site and SSRS for a team project.
    Foll. is the SharePoint site for the team project. When we click on the REPORTS link, it redirects us to the SQL Server Reporting Services website.
    My question is: How can I show or publish the reports from  SQL Server Reporting Services into SharePoint so that I can view the reports on SharePoint dashboard rather than having to go to the SSRS URL?

    Hi Nachiket,
    If you configure Reporting service for your TFS, then you can view the reports in report manger site when you click click report on Team Explorer. And SharePoint is a collaboration website product that offers deep integration with Office products like Word,
    Outlook, and Excel. You can save your team project related files in your SharePoint site. Check this
    page for more details.
    If you want to view reports that generated by reporting service on your SharePoint site, you might need to save the report in Excel and upload it to SharePoint site.
    Best regards, 

  • Creating alias for Web access to SQL Server Reporting Services

    Hello colleagues.
    I have MS SQL Server 2012 with SQL Server Reporting Services in domain "domain.local". In the local network at the entrance via Web browser to "mdr.domain.local/Reports" get into Reports of SQL Server Reporting Services and it's work fine.
    Necessary that the SQL Server Reporting Services could include via Web browser from alias "reports2.domain.local/Reports". To do this:
    1) I created a new A record "reports2" in the DNS leading to IP mdr.domain.local
    2) in Reporting Services Configuration Manager on a tab "Web Service URL" in "Report Server Web Service URLs" I add new record "http://reports2:80/ReportServer" (host Header Name: reports2)
    BUT "reports2.domain.local/Reports" is not work. When entering to "reports2.domain.local/Reports" I see page "An error in the security certificate for this Web Site..." and when I click "Continue to ...", then "Unable
    to find a web page."
    What and where I must add/change for work of alias "reports2.domain.local/Reports" by analogy with "mdr.domain.local/Reports"?
    I hope for your help.
    Thanks.

    WooW it's work!!! Thank you
    JJordheim  you are the best!
    With my PKI I create new certificate for "reports2.domain.local" and Import it to MDR server (in Personal). I create new network adapter and configure Reporting Services Configuration on "Report manager URL" tab (for SSL):
    mdr.domain.local - certificate "mdr.domain.local" - network adapter №1
    reports2.domain.local - certificate "reports2.sygroup.local" - network adapter №2
    And all work fine.
    If I configure all to 1 network adapter it's doesn't work.
    Thanks for help!

Maybe you are looking for