.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Another Issue with CAML Query

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :SharePoint


I know this question has to be put in Telerik Forums but its something related to CAML and data being bound programmatically. So, please take a minute to share your thoughts on my issue. Thanks.

In my previous post here , I had issue with CAML Query, which works great now. So, here is one of my issue related to it: I am using a Report which has Subreport. So, I have set the datasource of Main Report to be a DataTable that holds the CAML Query (the result CAML Query from previous post here ). Now, for the same parameter values, for each Report, I want its subsequent subreport to be be populate programmatically. But, this CAML Query do

View Complete Post

More Related Resource Links

Issue with CAML Query

I am having a RadGrid in Sharepoint Webpart with each row having a checkbox and multiple Columns where one of the Columns is ColumnID. When a multiple checkboxes are selected, their respective ColumnID Value is used to Query and generate report. I am using CAML Query to pass in the ColumnID of each checkbox selected and generate report based on the ColumnID Value. But I am having issue with the Query I have written. I have tried two ways: One of the ways was to Hardcode just two ColumnID Values as I was not sure how to read array of multiple columnID values. But I was wondering where I was going wrong since it was throwing following error: "Multiple with same name ColumnID were used" Telerik.Reporting.ReportParameter param1 = new Telerik.Reporting.ReportParameter(); param1.Name = "ColumnID"; param1.Type = Telerik.Reporting.ReportParameterType.Integer; param1.AllowBlank = false; param1.AllowNull = true; param1.Text = "ColumnID"; param1.Visible = true; param1.Value = "200"; this.ReportParameters.Add(param1); Telerik.Reporting.ReportParameter param2 = new Telerik.Reporting.ReportParameter(); param2.Name = "ColumnID"; param2.Type = Telerik.Reporting.ReportParameterType.Integer; param2.AllowBlank = false; param2.AllowNull = true; param2.Text = &qu

Issue with CAML Query regarding date comparision.

I have a below query in one the eventhandlers. All I do in the query is to get all records where Next_Date column is < CurrentDateTime ( I have shown current date below in full date format but it will be variable).

What I am observing is the comparision seems to be failing or not considering time format. For example the below query should not return any records when NEXT_DATE is 9/30/2010 23:59:59 and CurrentDateTime is 9/30/2010 06:22:22. However the query does return records. It looks like the comparision is just happening with Date and not time. What could be the problem? Please suggest.

         <FieldRef Name='Next_x0020_Date' />
         <Value Type='DateTime'>2010-09-30T13:13:13Z</Value>
      <FieldRef Name='Next_x0020_Date' Ascending='False' />

How to join two sharepoint list in c# by CAML query?

Hii All,
   I am using wss 3.0 and i have one site and site has 4 to 5 lists. lists are interconnected with lookup column and same column. I need to display some column fron one list and some from another.. i need to join that lists by where condition like project =project..

So how can i join??

Thank You

Data query task issue

Hi Someone help me undersand how to implement a Data meaning query  in SSIS project step by step. even a small package for testing this task ThanksThe complexity resides in the simplicity

Any way to execute a workflow when a caml query returns zero items?

Lets say I have a list with a status column and I want to execute a workflow when all items in the list have a status of complete. I basically want to execute a workflow when the caml query looking for non-complete statuses returns zero rows. Can I do this with SPD or are there any 3rd party tools for this? I'm thinking of writing one if there are not.

Caml query not working

Hi, I'm trying to query a SPListItem from a sharepoint list but it doesn't seem to work:   SPDocumentLibrary myDocuments = (SPDocumentLibrary)site.Lists["Documents"]; SPQuery query = new SPQuery() { Query = " <Where>" + " <Eq>" + " <FieldRef Name='DocumentPath' />" + " <Value Type='Text'>" + source + "</Value>" + " </Eq>" + " </Where>" }; var result = myDocuments.GetItems(query); I get no result, but there's an item with the specified "source" that does exist.

Need help in CAML Query - Sort Operation

hi I have a list column "DisplayOrder" in which i have integer values, i am using this query <Query><OrderBy><FieldRef Name="DisplayOrder" Ascending="True" /></OrderBy></Query> this returns me listcollection 1 10 15 2 it is considering the colums as string, can i convert this column to integer before sorting? i want this result 1 2 10 15

Sorting SPListItemCollection using CAML Query?

Hi, I have a SPListItemCollection from all the list items from a list I retrieve programmatically, is there a way that I can sort by the Title alphabetically?  or sort by date descending? Is there a way to do this?  Can CAML Query do this?  Thanks.

Sql query inner join issue

so i have a datagridview in a vb from. my plan is to display a table named emplyees, having the following fields: [employees] ([lastname], [firstname], [cost_center], [division], [job_title], [hiring_date], [exit_date], [functional_manager], [member_of], [backup_by], [out_of_office], [desk_phone], [mobile_phone], [comments]. But I need to make an inner join with 3 other tables. job_titles, divisons and rss. How should i writethe select command for this, having the inner join forthe follwing fields: division- division.name,job_title-job_titles.name , and member_of- rss.group_name. I have no idea how to do it. pls help Thanks

Issue with one of simple query

Hi team, I have a issue in the one of my query select   * from Prod3 where pnumber in (select distinct Policy from prod3_excel) order by pnumber This query gives me 8361 records and there are 8419 records in Prod3 how can i get the remaining records in Prod3 that is 58? select * from Prod3 where pnumber not in (select distinct Policy from prod3_excel) order by pnumber why this is not working? Thanks, Eshwar

caml query builder for wss 3 site

hi, is there a caml query builder that can be use for WSS 3.0 sites?

CAML query on external list is not working

Hi, I have an external list, display data from SQLServer 2008. Table on SQL have an UniqueIdentifire (GUID) type column as a Primary key. It also has one identifier column, Its value is increased by 1, as the item is created. In share point server side code, I want to fetch single record against the primary key GUID value. I write down the CAML query on GUID column and run without any error. But all the external list data is returned instead of Single list item. I also try to filter on Auto Incremented column, but same problem is occurred.

CAML query to access List data across multiple site collection.

Hi   Is there any way to get the Task List data across multiple site collection using CAML query. Currently, I have the code which will retrieve the data from a single site collection. Below is the code.                           /***************************************************I am using Moss2007.Thanks!Ravi             SPSiteDataQuery q = new SPSiteDataQuery();             q.ViewFields = "<FieldRef Name=\"Title\" />" "<FieldRef Name=\"Status\" Nullable=\"TRUE\"/>";             q.Lists = "<Lists ServerTemplate=\"107\"/>";             q.Webs = "<Webs Scope=\"SiteCollection\"/>";             q.Query = "<Where>" +                                "<Eq>" +                                     "<FieldRef Name=\"Status\" />" + "<Value Type=\"Choice\">Not  Started</Value>" +                                     "</Eq>" +                         "</Where>";             DataTable dt=null;             using (SPSite s = new SPSite("http://banglabguest1:31000/"))             {                 SPWeb w = s.OpenWeb();                 dt = w.GetSiteData(q);                 w = null;             }                              *************************

SQL query issue

Hi, I have a question that is pricking me as to how to solve it? Here is my requirement and table structures: create table #docs ( docid int, setupid int, docfname varchar(20), docmname varchar(20), doclname varchar(20), ) create table #setups ( docid int, setupid int ) -- A single doc can have multiple setups insert into #docs select 1, 100, 'Spock', 'Moreau', 'Livingston' union select 2, 101, 'Demento', 'Dolittle', 'Kevorkian' union select 3, 103, 'Faust', 'Zhivago', 'Jekyll' union select 4, 104, 'Freud', 'Laura', 'Phil' insert into #setups select 1, 200 union select 1, 300 union select 2, 200 union select 2, 400 union select 4, 200 union select 4, 500 /* If the doc has multiple setups I would like to copy over the data for the all the setupids as below */ select * from #docs select * from #setups drop table #docs drop table #setups I am trying to get this result using union and left out join etc., using a query and not using cursors/loops. Please help me and thanks for the responses. docid setupid docfname docmname doclname 1 100 Spock Moreau Livingston 1 200 Spock Moreau Livingston  --- data copied over 1 300 Spock Moreau Livingston  --- data copied over 2 101 Demento Dolittle Kevorkian 2 200 Demento Dolittle Kevorkian    --- data copied over 2 400 Demento Dolittle&n

CAML Query - DateTime

I wish to take data from the list, satisfying to the certain time range (BeginDate.....DateTime.....EndDate). How it can be made?

CAML query to pick docs where modified is older than today.


Hi I am looking for a CAML query which will return all documents throughout the site collection
for docs which have a Modified that have past today.
I cant seem to do this.

I have a query so far as this and it comes up with an error 'The property Query contains invalid value'

SPSiteDataQuery q = new SPSiteDataQuery();
q.ViewFields = "<FieldRef Name=\"Modified\"/>";
q.Lists = "<Lists ServerTemplate=\"101\"/>";
q.Webs = "<Webs Scope=\"SiteCollection\"/>";
q.Query = "<where><Geq><FieldRef Name='Modified' /><Value Type='DateTime'><Today OffsetDays='-1' /></Value></Geq></where>";

How do you do this ??

Limit to CAML Query Length ?

I have a dynamic CAML Query which runs Nested <Or> Statements. The Query works fine when there are Less than around 300 <Or>s but anything greater produces the "Value does not fall within the expected range" error. 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend