<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Sriram Reddy</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sriram_reddy1/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sriram_reddy1/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:50:32 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Excel with PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/sriram_reddy1/excel-with-powershell</link>
      <pubDate>Mon, 16 Jul 2012 01:46:00 GMT</pubDate>
      <dc:creator><![CDATA[Sriram Reddy]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriram_reddy1/2012/07/16/excel-with-powershell/</guid>
      <description><![CDATA[Reading data from Excel with PowerShell:
Microsoft Excel has a very complex COM object model that...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;"><strong><span style="text-decoration: underline;">Reading data from Excel with PowerShell:</span></strong></span></p>
<p><span style="font-size: small;">Microsoft Excel has a very complex COM object model that we can interact with in Windows PowerShell. We can read from .xlsx files as well as.csv files</span></p>
<p><span style="font-size: small;">In this blog i am focusing completely on script with out focussing on&nbsp;theory. Comments are given for the code&nbsp;where ever required. </span></p>
<p><span style="font-size: small; text-decoration: underline;"><strong>PowerShell script to read data from .xlsx file:</strong></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># Adding PS Snapin</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$snapin = Get-PSSnapin | Where-Object {$_.Name -eq </em><em>'Microsoft.SharePoint.Powershell'}</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>if ($snapin -eq $null)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>{</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp; Write-Host "Loading SharePoint Powershell Snapin" -ForegroundColor Green</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; Add-PSSnapin "Microsoft.SharePoint.Powershell"</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># This is a common function i am using&nbsp;which will release excel objects</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>function Release-Ref ($ref) {</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>([System.Runtime.InteropServices.Marshal]::ReleaseComObject(</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>[System.__ComObject]$ref) -gt 0)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>[System.GC]::Collect()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>[System.GC]::WaitForPendingFinalizers()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em></span></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># Creating excel object</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$objExcel = new-object -comobject excel.application&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$objExcel.Visible = $True&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# Directory location where we have our excel files</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$ExcelFilesLocation = "D:\Users\"</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# Open our excel file</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$UserWorkBook = $objExcel.Workbooks.Open($ExcelFilesLocation + "Users.xlsx")&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># Here Item(1) refers to sheet 1 of of the workbook. If we want to access sheet 10, we have to modifythe code to Item(10)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$UserWorksheet = $UserWorkBook.Worksheets.Item(1)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# This is counter which will help to iterrate trough the loop. This is simply row count </em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># I am taking row count as 2, because the first row in my case is header. So we dont need to read the header data</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$intRow = 2</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>Do {</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# Reading the first column of the current row</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;$FirstName = $UserWorksheet.Cells.Item($intRow, 1).Value()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# Reading the second column of the current row</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;$SecondName = $UserWorksheet.Cells.Item($intRow, 2).Value()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# Reading the first column of the current row. I am assuming that this is an email id field</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;$userLogOnEmail = $UserWorksheet.Cells.Item($intRow, 3).Value()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;# Read only login name from the above email id</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;$pos = $userLogOnEmail.IndexOf("@")</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;$userLogOnName = $userLogOnEmail.Substring(0, $pos)</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "First Name: " + $FirstName</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;"Second Name: " + $SecondName</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Log on email Name: " + $userLogOnEmail</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; "Only alias truncated upto @: " + $userLogOnEmail</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; # Move to next row</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; $intRow++</em></span></p>
<p><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;} While ($UserWorksheet.Cells.Item($intRow,1).Value() -ne $null)</em></span></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># Exiting the excel object</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$objExcel.Quit()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;#Release all the objects used above</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$a = Release-Ref($UserWorksheet)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$a = Release-Ref($UserWorkBook)&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$a = Release-Ref($objExcel)</em></span></p>
<p><span style="font-size: small;"><em></em>&nbsp;<em></em></span></p>
<p><span style="font-size: small;"><em><span style="text-decoration: underline;"><strong>PowerShell script to read data from .csv file:</strong></span></em></span></p>
<p><span style="font-size: small;"><em>This is quite easily doable compared to .xlsx file&nbsp;.Very less code is not required for this.&nbsp;we don't need to create excel object for reading .csv files.</em></span></p>
<p></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># All the date in the user excel will be imported</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$UserList = IMPORT-CSV D:\Users\users.csv</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># This foreach will loop all the rows in the above userlist</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>FOREACH ($User in $UserList) {</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em># "FirstName" is the header name of the column in the excel sheet</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>$UserFirstName = $OrmUser.FirstName</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em># "SecondName" is the header name of the column in the excel sheet</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>$UserSecondName = $OrmUser.SecondName</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em># "UserLogonName" is the header name of the column in the excel sheet</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>$UserLogOnMail = $User.UserLogonName</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em># Read only login name</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>$pos = $OrmUserLogOnMail.IndexOf("@")</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>if($pos -ge 0)</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>{</em></span></p>
<p style="padding-left: 90px;"><span style="font-size: small;"><em>$userLogOnName = $OrmUserLogOnMail.Substring(0, $pos)</em></span></p>
<p style="padding-left: 60px;"><span style="font-size: small;"><em>&nbsp;}</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em></span></p>
<p><span style="font-size: small;"><em></em>&nbsp;</span></p>
<p><span style="font-size: small; text-decoration: underline;"><strong>Reading .xlsx vs reading .csv files:</strong></span></p>
<p><span style="font-size: small;">It is easy to read data from .csv files compared to .xlsx files. if we have .xlsx files with us, we can just "save as" them to .csv files (What i did in my case :)).</span></p>
<p><span style="font-size: small;">The following are some of the advantages of reading data from .csv files compared to other:</span></p>
<p><span style="font-size: small;">1. No need to create excel object while reading from .csv files</span></p>
<p><span style="font-size: small;">2. Using Import-CSV, the execution speed will be increased</span></p>
<p><span style="font-size: small;">3. No need to create objects for each worksheet and workbook</span></p>
<p><span style="font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small; text-decoration: underline;"><strong>Saving data inExcel File:</strong></span></p>
<p><span style="font-size: small;">The following is the simple code that can be used to save the data in excel file</span></p>
<p></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$objExcel = new-object -comobject excel.application&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$objExcel.Visible = $True&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$FinalExcelLocation = "D:\Users\FinalUsersList.xlsx"</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># Create final worksheet</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>if (Test-Path $FinalExcelLocation)&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>{&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; # Open the document&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; $finalWorkBook = $objExcel.WorkBooks.Open($FinalExcelLocation)&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; $finalWorkSheet = $finalWorkBook.Worksheets.Item(1)&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>else {&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; # Create It&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; $finalWorkBook = $objExcel.Workbooks.Add()&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; $finalWorkSheet = $finalWorkBook.Worksheets.Item(1)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># Add Header</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$finalWorkSheet.Cells.Item(1,1) = "User Name";</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$finalWorkSheet.Cells.Item(1,1).Font.Bold = $True&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$finalWorkSheet.Cells.Item(1,2) = "Email"</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$finalWorkSheet.Cells.Item(1,2).Font.Bold = $True&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># As the first row is already filled with header, the row count will start from 2</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$FinalExcelRow = 2&nbsp;&nbsp;&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>Do {</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$finalWorkSheet.Cells.Item($FinalExcelRow,1) = "Sample"</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$finalWorkSheet.Cells.Item($FinalExcelRow,2) = Someone@sample.com</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$FinalExcelRow++</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp; }</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em># To wrap the text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</em>&nbsp;</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$d = $finalWorkSheet.UsedRange&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>$null = $d.EntireColumn.AutoFit()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>if (Test-Path $FinalExcelLocation)&nbsp;</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>{</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; # If already existing file is opned, save the file</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; $finalWorkBook.Save()</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>else</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>{</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; # If a new file is created, save the file with the given name</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>&nbsp;&nbsp;&nbsp; $finalWorkBook.SaveAs($FinalExcelLocation)</em></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><em>}</em> </span></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Meeting Workspace: OOB approval workflow to copy list items from one list to another</title>
      <link>https://docs.microsoft.com/archive/blogs/sriram_reddy1/sharepoint-meeting-workspace-oob-approval-workflow-to-copy-list-items-from-one-list-to-another</link>
      <pubDate>Mon, 21 May 2012 02:36:00 GMT</pubDate>
      <dc:creator><![CDATA[Sriram Reddy]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriram_reddy1/2012/05/21/sharepoint-meeting-workspace-oob-approval-workflow-to-copy-list-items-from-one-list-to-another/</guid>
      <description><![CDATA[A Meeting Workspace is a Web site that can be used to gather all the information and materials that...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: times new roman,times; font-size: medium;">A Meeting Workspace is a Web site that can be used to gather all the information and materials that are needed for one or more meetings. This can include information about the date, time, and place of the meeting, a library of shared documents, and lists of agenda items and objectives for the meeting, tasks assigned, and decisions taken.</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;"><span style="line-height: 115%; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-theme-font: minor-latin;">This provides few lists OOB for creating tasks, storing documents, and recording decisions etc. one small suggestion for those who want to use this template, this template will not support much customization. For example customizing this site like changing home page in SharePoint designer or modifying the OOB list column names may cause the site to behave in a weird manner.</span><span style="line-height: 115%; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-theme-font: minor-latin;"></span></span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">This template supports both&nbsp;single meeting&nbsp;workspace or recurrent meetings workspace i.e. multiple meetings with in the same&nbsp;workspace as shown below.</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4428.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4428.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4428.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4428.Untitled.png" /></a></span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">In&nbsp;case of <span style="line-height: 115%; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-theme-font: minor-latin;">recurrent meetings</span>, Instance Id will be maintained for each occurrence. What does this mean?</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">If we select May 22, 2012 occurrence as shown above, it will maintain a respective Instance Id for the selected occurrence. This instance id is created based on the date of the selected occurrence. If we have only one meeting in the site then the Instance Id is -1.To know more about this instance id, click <a href="https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.meetings.spmeeting.instanceid.aspx">here</a></span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">All the lists in side this site template will store list items based on the current selected recurrence. This means, if we store two records in the objective list for the selected occurrence they will not be visible for the other occurrences. Anyhow we have an option to see all the meetings inside the list/library also :)</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">A SharePoint site by using Meeting workspace template can be created by using Outlook also, to know how to do, see my blog <a href="https://blogs.msdn.com/b/sriram_reddy1/archive/2012/05/21/create-sharepoint-decision-meeting-workspace-from-outlook.aspx">here</a>.</span></p>
<h1><span style="text-decoration: underline;"><strong><span style="font-family: times new roman,times; font-size: medium;">To Modify Home page:</span></strong></span></h1>
<p><span style="font-family: times new roman,times; font-size: medium;">However If you still want to change modify home page, we can do that by using Content Editor webpart and JQuery. Put the following code in content editor webpart on the home page. This code adds two links to the left nav by append the required html to the existing left panel.</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;script src="https://blogs.msdn.com/_layouts/jquery-1.6.2.min.js" type="text/javascript"&gt;&lt;/script&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;script type="text/javascript"&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">$(document).ready(function() {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">$("#s4-leftpanel-content").append("&lt;div</span><br /><span style="font-family: times new roman,times; font-size: medium;">class='s4-ql'&gt;&lt;div class='menu vertical menu-vertical'&gt;&lt;ul</span><br /><span style="font-family: times new roman,times; font-size: medium;">class='root static'&gt;&lt;li class='static'&gt;&lt;a class='static menu-item' href='Lists/All%20Tasks/My%20Tasks.aspx'&gt;&lt;span</span><br /><span style="font-family: times new roman,times; font-size: medium;">class='additional-background'&gt;&lt;span class='menu-item-text'&gt;My</span><br /><span style="font-family: times new roman,times; font-size: medium;">Tasks&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li</span><br /><span style="font-family: times new roman,times; font-size: medium;">class='static'&gt;&lt;a class='static menu-item' href='pages/Reports.aspx'&gt;&lt;span</span><br /><span style="font-family: times new roman,times; font-size: medium;">class='additional-background'&gt;&lt;span class='menu-item-text'&gt;Reports</span><br /><span style="font-family: times new roman,times; font-size: medium;">(All</span><br /><span style="font-family: times new roman,times; font-size: medium;">Tasks)&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;");</span><br /><span style="font-family: times new roman,times; font-size: medium;">});</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;/script&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">This script requires &ldquo;jquery-1.6.2.min.js&rdquo; file to be present in the _layouts folder.</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">This site can&rsquo;t be saved with content. That means, if we save this site as template it will not include the content inside lists, libraries, etc, but it will have content editor webpart and any text/HTML code inside it. That is the reason I selected Content Editor webpart for adding links in the home page</span></p>
<h1><span style="text-decoration: underline;"><strong><span style="font-family: times new roman,times; font-size: medium;">Approval Workflow to copy items from one list to other.</span></strong></span></h1>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;My requirement says based on approving the records in list A, list items from List B should get copied to List C. This copy may include copying multiple items also. To copy one item at a time, we have OOB SharePoint designer action. But to do this bulk copying, I preferred JQuery. The following are the steps I followed to do this.</span></p>
<ol>
<li><span style="font-family: times new roman,times; font-size: medium;">Create an OOB approval workflow which will approve the records in List A by using SharePoint designer.</span></li>
<li><span style="font-family: times new roman,times; font-size: medium;">Copying from List B to List C can be implemented by using JQuey(See the code below with comments).</span></li>
<li><span style="font-family: times new roman,times; font-size: medium;">Now the toughest task comes here to invoke copying part once the records in List A got approved.</span><ol>
<li><span style="font-family: times new roman,times; font-size: medium;">That means calling Jquery from workflow which is not possible.</span></li>
<li><span style="font-family: times new roman,times; font-size: medium;">Put a button on click of which approval window will be opened by using JQuery. Once the user clicks on approve in approval window, this event will be captiured in the JQuery and the copying task should be done in JQuery.</span></li>
</ol></li>
</ol>
<h1><span style="text-decoration: underline;"><strong><span style="font-family: times new roman,times; font-size: medium;">Code for the button click to copy and approve</span></strong></span></h1>
<p><span style="font-family: times new roman,times; font-size: medium;">This code is included as part of content editor webpart</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;div&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;script src="https://blogs.msdn.com/_layouts/jquery-1.6.2.min.js" type="text/javascript"&gt;&lt;/script&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;script type="text/javascript"&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// To make sure the required JS files got loaded</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">ExecuteOrDelayUntilScriptLoaded(EnsureScriptsLoaded, "jquery-1.6.2.min.js");</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">ExecuteOrDelayUntilScriptLoaded(getWebSiteData,"sp.js");</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">ExecuteOrDelayUntilScriptLoaded(EnsureScriptsLoaded,"sp.ui.dialog.js");</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function EnsureScriptsLoaded() {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp; //Blank</span><br /><span style="font-family: times new roman,times; font-size: medium;">method -To ensure script files loaded</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;// This click is triggered on button click which will do both approve and copy jobs</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function ApproveTasks() {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// Get the context object</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var context = new SP.ClientContext.get_current();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var web = context.get_web();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">site = context.get_site();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.load(site);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var meetingList = web.get_lists().getByTitle('ListA');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var query = SP.CamlQuery.createAllItemsQuery();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">allItems = meetingList.getItems(query);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.load(allItems);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.executeQueryAsync(Function.createDelegate(this, this.success), Function.createDelegate(this, this.failed));</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function failed(sender, args)</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;alert("failed. Message:" + args.get_message());</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function success(sender, args)</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var recordCount = allItems.get_count();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">if(recordCount &gt;0)</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var meetingItem = allItems.itemAt(0);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">currentWeb = url of the current web;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var siteUrl = url of the current site;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.ItemID =Id of the cuurent item;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.itemURL = Item URl;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.workflowName = "Name of the workflow";</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.listId = meetingItem.get_item('GUID');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.itemURL= decodeURIComponent(this.itemURL);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.workflowName= decodeURIComponent(this.workflowName);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;this.itemURLID= itemURL + ItemID + "_.000";</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp; //Get Context details</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var thisSite = $().SPServices.SPGetCurrentSite();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp; var currentUser = $().SPServices.SPGetCurrentUser();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;currentUser = currentUser.toLowerCase();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //AJAX call to get current user task</span></p>
<p>&nbsp;&nbsp;&nbsp;<br /><span style="font-family: times new roman,times; font-size: medium;">$().SPServices({&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">operation: "GetToDosForItem",</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item:itemURLID,</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; async:false,</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;completefunc: function (xData, Status) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var respToDoID = '';</span><br /><span style="font-family: times new roman,times; font-size: medium;">var respToDoListID = '';</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var respToDoContentTypeId = '';</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;var isTaskFound = false;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">var respToDoStatus = '';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">var isTaskFormOpened = false;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">$(xData.responseXML).find("[nodeName='z:row']").each(function</span><br /><span style="font-family: times new roman,times; font-size: medium;">() {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">isTaskFound = true;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">respToDoStatus = $(this).attr("ows_Status");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">//Checking assigned task status&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">if (respToDoStatus == 'Not Started' || respToDoStatus == 'In Progress')</span><br /><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var respToDoAssignedTo = $(this).attr("ows_AssignedTo");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">var grp = respToDoAssignedTo.substring(respToDoAssignedTo.indexOf(';#')+ 2);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">respToDoAssignedTo = respToDoAssignedTo.toLowerCase();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">respToDoID = $(this).attr("ows_ID");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">respToDoListID = $(this).attr("ows_TaskListId");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">respToDoContentTypeId = $(this).attr("ows_ContentTypeId");</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var u = thisSite +'/_layouts/WrkTaskIP.aspx?List=' + respToDoListID + '&amp;ID=' + respToDoID +'&amp;ContentTypeId=' + respToDoContentTypeId + '&amp;IsDlg=1';</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">//Approval window popup will open</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">SP.UI.ModalDialog.showModalDialog({title: "Approve Request Process", width: 700, height: 470, url: u,allowMaximize: false, dialogReturnValueCallback:DialogCallbackMethod });</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isTaskFormOpened = true;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><br /><span style="font-family: times new roman,times; font-size: medium;">});</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isTaskFound == false) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert('No tasks found to approve');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (isTaskFound == true &amp;&amp; respToDoStatus == 'Completed' &amp;&amp; isTaskFormOpened == false) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert('No tasks found to approve');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp; });</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">else</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">alert('Workflow not started on the meeting details item. Contact system administrator');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">else</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">alert('No records in found');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// Custom callback function after the dialog is closed</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function DialogCallbackMethod(dialogResult, returnValue) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// If user clicks on approve</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp; if(dialogResult == 1) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// Copy list items from List B to List C</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CopyTasksToAllTasks();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;&nbsp; }</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function CopyTasksToAllTasks() {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context = new SP.ClientContext.get_current();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;var web = context.get_web();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;list = web.get_lists().getByTitle('ListB');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.load(list);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;destlist = web.get_lists().getByTitle('ListC');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.load(destlist);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var meetingDetails = web.get_lists().getByTitle('ListA');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.load(meetingDetails);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;var query = SP.CamlQuery.createAllItemsQuery();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">meetingdetailsItems = meetingDetails.getItems(query);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;context.load(meetingdetailsItems);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;allItems = list.getItems(query);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">fields = list.get_fields();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.load(fields); &nbsp;&nbsp;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;context.load(allItems);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.executeQueryAsync(Function.createDelegate(this, onListItemsLoadSuccess), Function.createDelegate(this, onListQueryFailed));</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;function onListItemsLoadSuccess(sender, args) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;var TextFiled = "";</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;&nbsp;var ListEnumerator = allItems.getEnumerator();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;var meetingItem = meetingdetailsItems.itemAt(0);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;var status = meetingItem.get_item('WorkflowStatus');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">while(ListEnumerator.moveNext())</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;var item = ListEnumerator.get_current();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var itemCreateInfo = new SP.ListItemCreationInformation();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// add an empty list item to List C</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">newItem = destlist.addItem(itemCreateInfo);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// copy title from List B to List C. Repeat the same</span><br /><span style="font-family: times new roman,times; font-size: medium;">for all the fileds</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">var title = item.get_item('Title');</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">if(title != null)</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">{</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">newItem.set_item('Title', title);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// Update the new item</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">newItem.update();</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">context.executeQueryAsync(Function.createDelegate(this, onListItemsLoadSuccess1),</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">Function.createDelegate(this, onListQueryFailed1));</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">function onListItemsLoadSuccess1(sender, args) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">// To reload the page on successful copy</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;function onListQueryFailed1(sender, args) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;alert("failed. Message:" + args.get_message());</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;function onListQueryFailed(sender, args) {</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;alert("failed. Message:" + args.get_message());</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&nbsp;}</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;/script&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;a id="CopyTasksListToAllTasksList" onclick="ApproveTasks();" href="#"&gt;</span></p>
<p><span style="font-family: times new roman,times; font-size: medium;">&lt;img title="Copy" id="imgCopyTasksListToAllTasksList" src="https://blogs.msdn.com/_layouts/images/icodct.gif" border="0" alt=""/&gt; Approve Request&lt;/a&gt;&lt;/div&gt;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Create SharePoint Decision meeting workspace from Outlook</title>
      <link>https://docs.microsoft.com/archive/blogs/sriram_reddy1/create-sharepoint-decision-meeting-workspace-from-outlook</link>
      <pubDate>Mon, 21 May 2012 00:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Sriram Reddy]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriram_reddy1/2012/05/21/create-sharepoint-decision-meeting-workspace-from-outlook/</guid>
      <description><![CDATA[The following are the steps to be followed to create SharePoint Decision Meeting WorkSpace

If you...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: times new roman,times; font-size: medium;">The following are the steps to be followed to create SharePoint Decision Meeting WorkSpace</span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">If you want to create the site from custom site template, upload the site template to the &ldquo;Solutions&rdquo; of the SharePoint&nbsp;site collection. To do this open the site collection and navigate to Site Settings --&gt; Galleries --&gt;Solutions as shown below. If not custom site template, you can skip this step</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/6813.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/6813.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/6813.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/6813.Untitled.png" width="163" height="129" /></a></span></p>
<ul>
<li>
<div><span style="font-family: times new roman,times; font-size: medium;">Open outlook, create a new Meeting.</span></div>
</li>
</ul>
<p style="padding-left: 90px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4466.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4466.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4466.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4466.Untitled.png" width="255" height="149" /></a></span></p>
<p style="padding-left: 30px;"></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">Fill all the information <b>like To, subject and location</b>. Create a ecurrence based on the requirement.&nbsp;Select the <b>Recurrence Pattern </b>and click on ok. Now meeting got created in the outlook</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8880.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8880.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8880.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8880.Untitled.png" width="494" height="201" /></a></span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">Click on &ldquo;Meeting Workspace&rdquo; icon on the top of the ribbon</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/1667.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/1667.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/1667.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/1667.Untitled.png" width="249" height="47" /></a></span></p>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;">If this icon is not visible, follow the steps below to configure this</span></p>
<ul>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">&nbsp;Click on the arrow on the right inide of the &ldquo;Meeting Workspace&rdquo; icon shown above and select &ldquo;More Commands&rdquo; option. The following popup will come.</span></li>
</ul>
</ul>
<p style="padding-left: 90px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4456.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4456.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4456.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4456.Untitled.png" /></a></span></p>
<ul>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">Select &ldquo;Meeting Workspace&rdquo; and click on &ldquo;Add&rdquo;. Click on Ok</span></li>
</ul>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;">To add this button to ribbon, follow the steps given <a href="https://support.microsoft.com/kb/2312523" target="_blank">here</a></span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">On clicking on the Meeting Workspace icon, a window will be opened on the right side. Click on &ldquo;Change Settings&rdquo; link</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3823.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3823.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3823.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3823.Untitled.png" width="187" height="319" /></a></span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">click on &ldquo;Change Settings&rdquo; if you dont find any settings or want to change the settings, the following window will be opened</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/1778.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/1778.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/1778.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/1778.Untitled.png" width="193" height="335" /></a></span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">Under first dropdown &ldquo;Select a&nbsp;location&rdquo;, click on &ldquo;Other&hellip;&rdquo; link to select a different site&nbsp;collection. It will open &ldquo;Other&nbsp; Workspace Server&rdquo; popup</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3644.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3644.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3644.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3644.Untitled.png" width="302" height="98" /></a></span></p>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;">Enter the new &nbsp;Project site collection url&nbsp;on this popup and click on Ok</span></p>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3823.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3823.Untitled.png"></a>&nbsp;</span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">Under the second section &ldquo;Select a workspace&rdquo;, select &ldquo;English&rdquo; as template language. In template type section, select the template which is saved in step2. click on Ok to save the settings</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/5353.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/5353.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/5353.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/5353.Untitled.png" width="166" height="274" /></a></span></p>
<ul>
<li><span style="font-family: times new roman,times; font-size: medium;">&nbsp;Click Create button to create the workspace. The final window is as shown below</span></li>
</ul>
<p style="padding-left: 60px;"><span style="font-family: times new roman,times; font-size: medium;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/5807.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/5807.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/5807.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/5807.Untitled.png" /></a>&nbsp;</span></p>
<ul>
<li><span style="line-height: 115%; font-family: times new roman,times; font-size: medium; mso-ansi-language: EN-AU; mso-fareast-font-family: Arial; mso-bidi-font-family: Arial; mso-fareast-language: JA; mso-bidi-language: AR-SA;" lang="EN-AU">Click on the link to open the created workspace in browser to make further configuration or entry of other items like meeting details, agenda etc.</span></li>
</ul>
<p style="padding-left: 60px;">&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Localization in SSRS reports</title>
      <link>https://docs.microsoft.com/archive/blogs/sriram_reddy1/localization-in-ssrs-reports</link>
      <pubDate>Mon, 09 Jan 2012 05:56:00 GMT</pubDate>
      <dc:creator><![CDATA[Sriram Reddy]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sriram_reddy1/2012/01/09/localization-in-ssrs-reports/</guid>
      <description><![CDATA[Localization is SSRS reports:
Localization means displaying the content in several languages which...]]></description>
      <content:encoded><![CDATA[<h1>Localization is SSRS reports:</h1>
<p>Localization means displaying the content in several languages which will help the user across the globe to access the content. As the reports being one of the important tools and are used in various ways as per the requirement of the user, the localization of report plays major role. It is a normal requirement for any project accessed around the world</p>
<h1>Why localization:</h1>
<p>Localization is the process of customizing your application for given culture and locale. To display any content of the project in multiple languages, it is not practical to develop the same project in multiple languages. &nbsp;In the same way to make the report available in different locales, it is not a best way to develop different .rdl files. By using localization we can make a single .rdl file available across different locales.</p>
<h1>How to localize the report:</h1>
<p>Microsoft has not provided a way to add .resx(resource file) to the report project. The way around is to use custom assembly which can be used across multiple projects. Follow the following steps to create a custom assembly</p>
<ul>
<li>Start the Visual Studio, select File--&gt;New--&gt;Project</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/6354.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/6354.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/6354.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/6354.Untitled.png" /></a></p>
<ul>
<li>Select appropriate language(My case visual C#), select Class Library and give the name in the text box and click on OK button</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4274.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4274.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/4274.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/4274.Untitled.png" /></a></p>
<ul>
<li>To add&nbsp;.resx file to the solution, right click on the project and add a new item and select Resource file</li>
</ul>
<p style="padding-left: 30px;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3438.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3438.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3438.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3438.Untitled.png" /></a></p>
<p style="padding-left: 30px;">Add the required resources in the .resx file in Name &ndash; value pair model.</p>
<ul>
<li>Add the following method to the class file so that the user can access these resources from outside.</li>
</ul>
<table style="width: 628px; height: 222px;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="638">
<p>public static&nbsp; class LocalizedValue</p>
<p>{</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Public static string GetString(string&nbsp; resourceName, string culture)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CultureInfo cultureInfo = new&nbsp; CultureInfo(culture);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return&nbsp; ClassLibrary1.Resource1.ResourceManager.GetString(resourceName, cultureInfo);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>}</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p style="padding-left: 30px;">Build the project and get the dll from bin folder.</p>
<p style="padding-left: 30px;"><b>Our dll is ready. Use the following steps to use the dll in the report designer</b></p>
<ul>
<li>Open visual studio for reports(SQL Server Business Intelligent Development Studio). Click on File--&gt;New--&gt;Project</li>
</ul>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3808.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3808.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/3808.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/3808.Untitled.png" /></a></p>
<ul>
<li>Select &ldquo;Report Server Project&rdquo; and give the proper name and click on OK</li>
</ul>
<p style="padding-left: 30px;"><br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8836.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8836.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8836.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8836.Untitled.png" /></a></p>
<ul>
<li>Right click on Report folder, select &ldquo;Add new report&rdquo;. Enter appropriate values in the report wizard. For connection string, click on &ldquo;Edit&rdquo; button and select the appropriate details.Finally click on <strong>finish</strong> to create the report.</li>
</ul>
<p style="padding-left: 30px;"><br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8233.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8233.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8233.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8233.Untitled.png" /></a></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;">Click on &ldquo;Next&rdquo; and in the next step, select the query and finish the other steps. We can write the query by using query builder also. Select appropriate columns to be displayed in the reports. It may look something as follows</p>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8461.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8461.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/8461.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/8461.Untitled.png" /></a></p>
<p style="padding-left: 30px;">&nbsp;Now the localization part requires to be added. First navigate to &ldquo;Report Properties&rdquo; and add the as show below</p>
<p style="padding-left: 30px;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/0638.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/0638.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/0638.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/0638.Untitled.png" /></a></p>
<p style="padding-left: 30px;"><br />Finally the last step is to use the function in the assembly. To do this, right click on the textbox and select &ldquo;Expression&rdquo;, the following window will we displayed. We have to write the code there</p>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/7875.Untitled.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/7875.Untitled.png"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/50/27/7875.Untitled.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-50-27/7875.Untitled.png" /></a></p>
<p style="padding-left: 30px;">This expression calls the GetString method with the name of the resource which will return the value of the resource as per the current locale</p>
<h1>Problem you may face</h1>
<p>The most common issue the developer may face is, Inspite of adding the new resource to .resex file it will not be show in the report. The reason for this is the dll is not updated in the location specified in the references of the report. We have to build the new dll and copy that dll to the location which is referenced in the report properties</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>