SSRS 2005 - Split multiline address field into multiple address columns

Hi all
I have an address field called SiteAddress, which is multiline with carriage returns, and stores addresses as:
SiteAddresss
SiteABC
1 Main Street
Withington
Manchester
M20 1FT
How do I split this address field across multiple new fields, eg:
SiteName         AddressLine1      AddressLine2       AddressLine3     AddressLine4      Postcode
SiteABS           1 Main Street      Withington           Manchester                                
M20 1FT
Thanks for all help
Naz

It is simple using TSQL, refer below example,
;with cte as (
select 'site name' [address]
union
select 'address line 1' [address]
union
select 'address line 2' [address]
union
select 'address line 3' [address]
select * from (select [address], row_number() over (order by address desc) rn from cte) x
pivot
(max([address]) for rn in ([1],[2],[3],[4])) pvt
However if you need in SSRS itself, you can try using custom code to split the address string by char(10) or char(13) and then insert into an array. If the input parameter is 1 return the first address from the array, 2 return the second address and so on.
Custom code can be called from the textbox expression as,
=code.getAddress(Fields!Address, 1)
Regards, RSingh

Similar Messages

  • How can I split an Orders05 iDoc into multiple iDocs?

    Hello,
    Can one of you experts please tell me how I can split an ORDERS05 iDoc into multiple iDocs based upon Delivery addresses? 
    For example, if the iDoc contains 3 different Delivery Addresses then I need to split it into 3 iDocs.
    It has been suggested to me that I can Create a custom function module. In this custom fm split the idoc into 3 based on the delivery address and create it using the FM MASTER_IDOC_DISTRIBUTE.
    Problem is I don't know how to do this.  Any help is greatly appreciated.  Thanks.
    Dan

    Hi Dan Avis
    Write a Custom  Z program .
    1 get order05 idoc number....
    2 get the segment details...(Based on you condition...)
    3 In a loop  send the data to the FM MASTER_IDOC_DISTRIBUTE  (Based on you condition...)
    4 IDOC will generated,,,every loop and
    5 Change the status of original idoc .
    or
    Create Function module and use the FM as process code to create 3 idocs...and processs...new generated idoc and block original idocs...
    Call me if you have questions  @ 302 290 5677
    Thanks
    Ramesh

  • Formatting Address Fields into one

    Using Acrobat X PRO:
    I have a multi-page document in which a user is prompted for the address in two different formats:
    1) With the address split into 4 different values/fields:
    Street Field, City Field, State Field, Zip Field
    Example: "1234 Count Rd" (Next Line) "St Louis", "MO"  "55555"
    2) With the address all together:
    Complete Address on one line with a maximum length of 40 Characters.
    Example: 1234 Count Rd, St. Louis, MO 55555
    I would like users to be able to Fill in the Street, City, State, and Zip fields, and no matter what the format of the following fields, have the data autopopulated.
    This isn't a problem for example #1.  However, with #2 if i place all fields close together, I have to guess on how far apart to space each field and still have it fit and format properly.
    Is there any way to combine the values of 4 fields into one value (separated by commas)?
    Making the address field 'auto-fit' may be necessary but it's ugly if there is extra space in the remaining fields. 
    PLEASE SEE THIS EXAMPLE document i have created for the purpose of this post

    And if the combined fields are longer than 40 characters?
    With Acrobat 4 there was a sample form that one entered the data in fields like tile, first name, mi, last name, abd degrees  and then created a full name from those individual fields and adjusted for missing data.
    The doucment level script:
    / Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
      var test = 0; // all strings null
      var sResult; // re slut string to return
    // force any number string to a character string for input variables
      s1 = s1.toString();
      s2 = s2.toString();
      s3 = s3.toString();
      if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present 
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
      if (s1 != "") test += 1; // string 1 present add binary value: 001
      if (s2 != "") test += 2; // string 2 present add binary value: 010
      if (s3 != "") test += 4; // string 3 present add binary value: 100
      /* return appropriate string combination based on
      calculated test value as a binary value
      switch (test.toString(2)) {
      case "0": // no non-empty strings passed - binary 0
         sResult = "";
      break;
      case "1": // only string 1 present - binary 1
         sResult = s1;  
      break;
      case "10": // only string 2 present - binary 10
         sResult = s2;  
      break;
      case "11": // string 1 and 2 present - binary 10 + 1
         sResult = s1 + sep + s2; 
      break;
      case "100": // only string 3 present - binary 100
         sResult = s3;
      break;
      case "101": // string 1 and 3 - binary 100 + 001
         sResult = s1 + sep + s3; 
      break;
      case "110": // string 2 and 3 - binary 100 + 010
         sResult = s2 + sep + s3; 
      break;
      case "111": // all 3 strings  - binary 100 + 010 + 001
         sResult = s1 + sep + s2 + sep + s3; 
      break;
      default: // any missed combinations
         sResult = "";
      break;
    return sResult;
    And then one could use a custom calculation script for a full address field:
    // Full business address including country
    function doFullBusinessAddress() {
      var ba = this.getField("business.address.full");
      var bc = this.getField("business.address.citystatezip");
      var bu = this.getField("business.address.country");
      event.value = fillin(ba.value, bc.value, bu.value, ", ");
    doFullBusinessAddress();

  • How to Split Single Outbound Idoc into Multiples

    Hi guys
    Hope you all are doing good.
    Can you please let me know , How to Split Single Outbound IDOC into multiples.
    I am looking for some sought of configuration in IDOC/from SHIPMENT Configuration level.  Because this needs to be implemented for Shipment IDOCS.  Please let me know if this can be done through configurations apart from implementing  User exit or copying the outbound shipment function module.
    Awaiting for your valuable replies.
    Best Regards
    Shiva

    Hello,
    1. Routes
    2. Packaging used
    3. Shipment Type
    Regards
    Waza

  • Split TempDB Data file into multiple files

    Hey , 
    I have been seeing TempDB contention in memory on our SQL server 2012 Enterprise Edition with SP2 and I need to split TempDB Data file into multiple files .
    Could someone please help me to verify the following information:
    1]
    We are on SQL server 2012 Enterprise Edition with service pack2 but as per SQL Server 2012 Enterprise Edition under CAL Licensing –We are limited to use 20 logical processors instead 40 logical processors. Our SQL is configured
    on NUMA nodes and with the limitation SQL uses only 2 NUMA nodes on live .There are 10 logical CPUs are evenly assigned to each NUMA nodes. Microsoft recommends that if SQL server configured on NUMA node and we have 2 NUMA nodes, then we may add two data files
    at a time. Please let me know should I add two TempDB data file at a time?
    2] We have TempDB Data and log files both on the same Drive of SQL server  .When I split TempDB into two Data files, I can get them on the same Drive .What your recommendation should I need to create TempDB Data files on the same drive or on separate
    disks?
    3] What would be the blackout plan for splitting the tempdb into multiple files? Please let me know if someone has a better back out plan ?
                1] Run script that create tempdb Database with a single file
    2] Reboot SQL service in order to apply change   
    Your help will be apprecited .
    Thanks ,
    Daizy

    Tom , I am seeing TempDB contention on Production server when there is a heavily load on sql server . We also experiencing the overall system slowness.Please look at Pagelatch wait statistics on our server ,Please advise .
    wait_type
    waiting_tasks_count
    wait_time_ms
    max_wait_time_ms
    signal_wait_time_ms
    PAGELATCH_UP
    2680948
    3609142
    10500
    508214
    PAGELATCH_SH
    1142213
    1338451
    8609
    324538
    PAGELATCH_NL
    0
    0
    0
    0
    PAGELATCH_KP
    0
    0
    0
    0
    PAGELATCH_EX
    44852435
    7798192
    9886
    6108374
    PAGELATCH_DT
    0
    0
    0
    0
    Thanks ,
    Daizy

  • How do you import CSV, tab, and OFX files into multiple Numbers columns

    This Apple function from Numbers '08 Help "Importing a Document" does not seem to work:
    "You can create a new Numbers spreadsheet by importing a document created in Microsoft Excel or AppleWorks 6. Numbers can also import files in comma-separated value (CSV) format, tab-delimited format, and Open Financial Exchange (OFX) format."
    No amount of experimenting with Import, Export, Save As, Paste and Match Style, or using other applications will enable importing CSV, tab, or OFX files into multiple Numbers columns. Instead, all data is imported into a single Numbers column, which then has to be manually and tediously parsed one data element at a time into columns, one row, and one column at a time.

    Jerrold Green1 wrote:
    Joe,
    They all have worked here. I'm not presently able to try in Numbers 08, but I know I've done them all.
    Just double-clicking a .csv file will open Numbers and display the data in a table. Dragging a .csv file to your Numbers icon on the Dock will open it as a Numbers table. Dragging it to a Sheet in an open Numbers document will make a new table in an existing document, and dragging to a table will insert the csv file into the table you dropped it into.
    CAUTION
    With Numbers '08, CSV files must use the comma as delimiter on every setting of decimal separator.
    Numbers '09 behave differently.
    With your tab-delimited file open in a word processor, copy it, then paste it into a table in an open Numbers document. When doing this, select a cell in the table, but don't double-click into the text field of the cell, then paste.
    Why use this long road when we may import directly Tab Separated Values file (tsv.txt) with Numbers '08 (or '09) ?
    Yvan KOENIG (VALLAURIS, France) jeudi 2 décembre 2010 21:05:36

  • Make the address field in delivery address tab as mandatory

    Hi, I want to make the address field in delivery address tab as mandatory for the combination PO type NB and accouting type F. The customer exit EXIT_SAPLMMDA_001 is not getting triggered for this. So could you please help me with this. I am trying to find a BADI.

    I assume you are not in a global working company.
    There are many countries in the world which do not have formal region codes and do not use tax jurisdiction codes.
    So making all the fields mandatory would disturb others that are not even able to fill something.
    I do not really understand the rational behind this, because the address fields are always filled, either from your plant address or (if maintained) from the storage location address, or from address of ship-to party of sales order in case of third-party POs.

  • My Mac Book Pro address book has multiple addresses and when I try to "look for duplicates" it says there are none?

    My Mac Book Pro Address Book has multiple addresses for the same person from syncing before I cloud. When I try to "look for duplicates" it returns "no duplicates found" why does that happen? How can I correct it?

    For which version of Mail and OS?

  • Splitting the single record into multiple records based on validity

    Hi Guru's,
    basically i am an BI consultant with less knowledge on ABAP, can i request your help on the ABAP task.
    I am working on HR module which is integrated with SAP BI,  the reports will be executed based on calendar month the requirement is i should split the single record into a multiple records based on validity of the record.  basically the HR data would be in data from and date to. 
    below is the logic
    Check whether the start and end date of the record are in the same month and year.
    If yes  nothing changes
    If no  create multiple records
    1st record  original start date of the record u2018till end of that month
    Following record  1st of the next month  u2018till last day of the month
    u2026
    Last record  1st of the month u2018till original end date.
    All fields will have the same values, only the datefrom and dateto fields change.
    Can any one please provide me the same code to proceed on my task.
    Thanks and Regards,
    Venkat

    Hi,
    Using Rule group we can split it.
    Using Rule Group in SAP-BI  Part - 1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20rule%20group%20in%20sap-bi%20%20part%20-%201.pdf
    Thanks
    Reddy

  • Splittling numbers in one field into multiple sections

    Good Morning,
    I am currently working on a project where a user inputs required information on digital entry form, which then auto populates the inputted data onto multiple documents. While a majority of the data maintains the same format integrity throughout the documents, I am running into issues with documents that deviate from that standard input format. For example, when users enter the following numbers, they are entered as one line of text:
    However, the output on a required document splits these numbers into multiple sections:
    The output document is not maintained by my organization and I cannot make changes to the document formatting. Can anyone assist me in finding a way to split the single line text into the mutliple fields as shown? 

    If you're importing the form data into the second form, create the NCPDP# field and make it hidden. The create three visible fields to hold the three parts of the number, for example: NCPDP2.1, NCPDP2.2, and NCPDP2.3
    You can then use a custom Validate script for the hidden NCPDP field that's something like the following:
    // Custom Validate script
    (function () {
        // Do nothing if field is blank
        if (!event.value) return;
        // Populate the other fields if the string length is correct
        if (event.value.length === 7) {
            getField("NCPDP2.1").value = event.value.slice(0, 2);
            getField("NCPDP2.2").value = event.value.slice(2, 6);
            getField("NCPDP2.3").value = event.value.slice(6);
        } else {
           // What do you want to do here if the string length isn't 7?
    Look up the slice string method in any decent JavaScript reference for more informatio on how it works. Note that you can make the subfields into combs fields to match the spacing of the boxes.

  • How to split large video files into multiple individual clips by date

    Hello. I'm looking for a freeware/shareware program (if one exists, or willing to pay for one if it does this well) that will:
    1) Analyze a large AVI file identifying the start/start points of each segment of video and the dates the video segments were shot.
    2) Then allow me to organize (for example, join 2 or more segments together if it's a video with a lot of start/stop points during the same shot) the segments identified in step 1 into logical clips that could be split apart from the 1 large AVI file.
    3) Lastly, it would split my one large AVI file into the multiple clips or files that I identified in step 2.
    A piece of software called FootTrack does a great job analyzing AVI files as I describe in steps 1 & 2, but it doesn't allow you to split or export the one avi file into multiple avi files.
    I really don't want to have to do this one clip at a time, I've got to believe there's a program out there that will automate this process for me.
    Thanks

    I don't know of a way to automate it. I just did about 15 years worth. It wasn't too hard. I use an application called mpegstreamclip. Its very easy and free to download either from the apple site or direct from its site.
    http://www.squared5.com/
    Bascically you set the in and out points with the i and o keys and export.

  • Split a large table into multiple packages - R3load/MIGMON

    Hello,
    We are in the process of reducing the export and import downtime for the UNICODE migration/Conversion.
    In this process, we have identified couple of large tables which were taking long time to export and import by a single R3load process.
    Step 1:> We ran the System Copy --> Export Preparation
    Step 2:> System Copy --> Table Splitting Preparation
    We have created a file with the large tables which are required to split into multiple packages and where able to create a total of 3 WHR files for the following table under DATA directory of main EXPORT directory.
    SplitTables.txt (Name of the file used in the SAPINST)
    CATF%2
    E071%2
    Which means, we would like each of the above large tables to be exported using 2 R3load processes.
    Step 3:> System Copy --> Database and Central Instance Export
    During the SAPInst process at Split STR files screen , we have selected the option 'Split Predefined Tables' and select the file which has predefined tables.
    Filename: SplitTable.txt
    CATF
    E071
    When we started the export process, we haven't seen the above tables been processed by mutiple R3load processes.
    They were exported by a Single R3load processes.
    In the order_by.txt file, we have found the following entries...
    order_by.txt----
    # generated by SAPinst at: Sat Feb 24 08:33:39 GMT-0700 (Mountain
    Standard Time) 2007
    default package order: by name
    CATF
    D010TAB
    DD03L
    DOKCLU
    E071
    GLOSSARY
    REPOSRC
    SAP0000
    SAPAPPL0_1
    SAPAPPL0_2
    We have selected a total of 20 parallel jobs.
    Here my questions are:
    a> what are we doing wrong here?
    b> Is there a different way to specify/define a large table into multiple packages, so that they get exported by multiple R3load processes?
    I really appreciate your response.
    Thank you,
    Nikee

    Hi Haleem,
    As for your queries are concerned -
    1. With R3ta , you will split large tables using WHERE clause. WHR files get generated. If you have mentioned CDCLS%2 in the input file for table splitting, then it generates 2~3 WHR files CDCLS-1, CDCLS-2 & CDCLS-3 (depending upon WHERE conditions)
    2. While using MIGMON ( for sequencial / parallel export-import process), you have the choice of Package Order in th e properties file.
      E.g : For Import - In the import_monitor_cmd.properties, specify
    Package order: name | size | file with package names
        orderBy=/upgexp/SOURCE/pkg_imp_order.txt
       And in the pkg_imp_txt, I have specified the import package order as
      BSIS-7
      CDCLS-3
      SAPAPPL1_184
      SAPAPPL1_72
      CDCLS-2
      SAPAPPL2_2
      CDCLS-1
    Similarly , you can specify the Export package order as well in the export properties file ...
    I hope this clarifies your doubt
    Warm Regards,
    SANUP.V

  • Inserting Lots of fields into multiple tables

    Hi, i would like to enter lots of fields into mutiple tables
    in my access database. I have 6 pages which in turn have a
    different set of forms which must be inserted into its own table. I
    tried to insert some information into the table but because my
    database is a relational db i get an error message "You cannot add
    or change a record because a related record is required in table
    'Hosting'. Im not entirely sure what this error means but it is
    quite urgent that this is sorted. Another way in which i tried it
    was to carry all the form values over each page and recarry them
    onto the final 'insert' page but i cannot insert more than one
    insert record behavior and if i do i get a dim error message.
    Can somebody please help me this is very urgent.
    Thanks in advance,
    Adam

    Adam
    The error means that you are trying to insert a record into a
    table that is
    dependent upon some of the information being in a higher
    table, so you need
    to do the inserts in the correct order.
    There is an old tutorial on the MM site on how to handle
    multiple tabel
    inserts, which you may find useful.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "muzicmistro" <[email protected]> wrote in
    message
    news:e3fej1$8gp$[email protected]..
    > Hi, i would like to enter lots of fields into mutiple
    tables in my access
    > database. I have 6 pages which in turn have a different
    set of forms which
    > must
    > be inserted into its own table. I tried to insert some
    information into
    > the
    > table but because my database is a relational db i get
    an error message
    > "You
    > cannot add or change a record because a related record
    is required in
    > table
    > 'Hosting'. Im not entirely sure what this error means
    but it is quite
    > urgent
    > that this is sorted. Another way in which i tried it was
    to carry all the
    > form
    > values over each page and recarry them onto the final
    'insert' page but i
    > cannot insert more than one insert record behavior and
    if i do i get a dim
    > error message.
    >
    > Can somebody please help me this is very urgent.
    >
    > Thanks in advance,
    >
    > Adam
    >

  • I can't split a home DVD into multiple events. Why?

    I have a DVD of old super 8 movies that I converted into a DVD years ago and want to extract selected segments as short movie clips. I have been able to load the entire DVD as a single event but I wanted to break this single event into multiple events based on various themes. My problem is that I don't seem to be able to split the content at all. The "Split event before selected Clip" always appears to be grayed out. What am I doing wrong?
    paulfromcrystal

    I just figured it out.  Somehow I didn't change it to the correct code of 1.  So on the second shot of 5 allowed I realized I didn't change and save.  Now the dvd played.

  • How to split one pdf form into multiple forms

    Is it possible to split one PDF form into three separate forms without recreating each one?

    Sure, just extract the pages to a new file. The form fields will stay in
    place.

Maybe you are looking for