caml

Pass a parameter value to a Dataset Parameter in SSRS 2008

非 Y 不嫁゛ 提交于 2019-12-03 16:35:26
I have a dataset with a parameter as which is passed to a query as shown below. The issue here is DataSet parameter queryOptions does not accept the value from the Report Parameter Date . If i hardcode any value e.g <CalendarDate> 08/11/2012 </CalendarDate> instead of <CalendarDate> = Parameters!Date.Value </CalendarDate> the report works fine. What wrong am i doing while passing parameter. I even created another Dataset Parameter named Date and assigned Parameter Value [@Date] even that did not work. Note : Parameter Date is of type DateTime You can try the dynamic expression under your

CAML queries: how to filter folders from result set?

馋奶兔 提交于 2019-12-03 09:46:05
I'm using caml query to select all documents which were modified or added by user. Query runs recursively on all subsites of specified site collection. Now problem is I can't get rid of folders which are also part of result set. For now I'm filtering them from result datatable. But I'm wondering: Is it possible to filter out folders from result set just by using caml? Johan Leino This CAML actually does the trick: <Where> <Eq> <FieldRef Name='FSObjType' /> <Value Type='Integer'>0</Value> </Eq> </Where> that will not give you any folders. drax So, i figured it out :) You can use FieldRef=

How to convert a string to integer list in ocaml?

我与影子孤独终老i 提交于 2019-12-02 04:32:49
I need to pass two list as command line arguments in ocaml. I used the following code to access it in the program. let list1=Sys.argv.(1);; let list2=Sys.argv.(2);; I need to have the list1 and list2 as list of integers. I am getting the error This expression has type string but an expression was expected of type int list while processing. How can I convert that arguments to a list of integers. The arguments are passed in this format [1;2;3;4] [1;5;6;7] Sys.argv.(n) will always be a string. You need to parse the string into a list of integers. You could try something like this: $ ocaml OCaml

SharePoint: How to get Top 5 records by using CAML query from a list

梦想的初衷 提交于 2019-12-01 15:44:13
I have already created a webpart to show the data from list, but I really want is to only show top 5 records from that list (by using CAML query). Does anyone know how to do this? Many thanks. <Query> <OrderBy> <FieldRef Name='ID' Ascending='False' /> </OrderBy> </Query> You could set the RowLimit property of your SPQuery object. The <RowLimit> tag is in the schema definition of a view (direct child of < View> ) and therefore cannot be nested inside a <Query> tag. Sunil Kumar Pashikanti The below code shows top 5 records from the list (by using CAML query). SPQuery spQuery = new SPQuery();

SharePoint: How to get Top 5 records by using CAML query from a list

拟墨画扇 提交于 2019-12-01 13:47:53
问题 I have already created a webpart to show the data from list, but I really want is to only show top 5 records from that list (by using CAML query). Does anyone know how to do this? Many thanks. <Query> <OrderBy> <FieldRef Name='ID' Ascending='False' /> </OrderBy> </Query> 回答1: You could set the RowLimit property of your SPQuery object. The <RowLimit> tag is in the schema definition of a view (direct child of < View> ) and therefore cannot be nested inside a <Query> tag. 回答2: The below code

Sharepoint 2010 client object model with camlQuery - file download but no content / 0 byte

半城伤御伤魂 提交于 2019-12-01 06:47:24
I'm trying to download a txt file from a subfolder within a folder in a document library. I'm using camlQuery to achieve this. Unfortunately, i get no content of the txt file. It has 0 byte. public void SaveFolderFiles(string fileName, string libraryName, ClientOM.ClientContext clientContext) { ClientOM.List sharedDocumentsList = clientContext.Web.Lists.GetByTitle(libraryName); ClientOM.CamlQuery camlQuery = new ClientOM.CamlQuery(); camlQuery.FolderServerRelativeUrl = "/Site/Folder/Folder2010/"; camlQuery.ViewXml = @"<View> <Query> <Where> <Eq> <FieldRef Name='FileLeafRef'/> <Value Type='Text

Sharepoint 2010 client object model with camlQuery - file download but no content / 0 byte

こ雲淡風輕ζ 提交于 2019-12-01 04:58:56
问题 I'm trying to download a txt file from a subfolder within a folder in a document library. I'm using camlQuery to achieve this. Unfortunately, i get no content of the txt file. It has 0 byte. public void SaveFolderFiles(string fileName, string libraryName, ClientOM.ClientContext clientContext) { ClientOM.List sharedDocumentsList = clientContext.Web.Lists.GetByTitle(libraryName); ClientOM.CamlQuery camlQuery = new ClientOM.CamlQuery(); camlQuery.FolderServerRelativeUrl = "/Site/Folder

MAX query using CAML

本秂侑毒 提交于 2019-11-30 19:57:35
I want to select a sharepoint list item which has the Maximum value for a particular column. How can I do this using CAML queries? <Query> <OrderBy> <FieldRef Name="particularcolumn" Ascending="FALSE" /> </OrderBy> </Query> The following CAML query would return the maximum value for a given column: var maxValue; try { using (SPSite objSite = new SPSite(sSiteUrl)) { using (SPWeb objWeb = objSite.OpenWeb()) { SPList objList = objWeb.Lists[sListName]; SPQuery objQuery = new SPQuery(); objQuery.Query = "<OrderBy><FieldRef Name='ColumnName' Ascending='False' /></OrderBy><RowLimit>1</RowLimit>";

MAX query using CAML

♀尐吖头ヾ 提交于 2019-11-30 03:32:32
问题 I want to select a sharepoint list item which has the Maximum value for a particular column. How can I do this using CAML queries? 回答1: <Query> <OrderBy> <FieldRef Name="particularcolumn" Ascending="FALSE" /> </OrderBy> </Query> 回答2: The following CAML query would return the maximum value for a given column: var maxValue; try { using (SPSite objSite = new SPSite(sSiteUrl)) { using (SPWeb objWeb = objSite.OpenWeb()) { SPList objList = objWeb.Lists[sListName]; SPQuery objQuery = new SPQuery();

CAML query that includes folders in result set

本小妞迷上赌 提交于 2019-11-29 01:52:14
I'm trying to write a CAML query that executes against a specific SPList, scoped to a specific folder, recursive from that point, and returns all ListItems (which meet a criteria) and Folders. Here's the code for the query which seems like it should work (formatted for readability): SPQuery query = new SPQuery(); query.Query = " <Where> <Or> <Contains> <FieldRef Name=\"FileRef\" /> <Value Type=\"Text\">foo</Value> </Contains> <Eq> <FieldRef Name=\"FSObjType\" /> <Value Type=\"Lookup\">1</Value> </Eq> </Or> </Where>"; query.ViewFields = " <FieldRef Name=\"CustomField1\" Nullable=\"TRUE\" />