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

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

Group By All Columns except the image field

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :
Good evening all
i have an image in my select fields, and i know that the Group by clause cant take the Image field, i have a query that looks like this


View Complete Post

More Related Resource Links

How to use server side validation to ensure image field is not null


I'm having trouble accomplishing the above. Below is all the mark up and code. I'm not getting error messages, but the validate image function is not working (fileupload portion is working ok).

In my attempt below---not sure if it's the simplest or best validation approach anyway---the "UserId" parameter appears during rendering to be empty---but in most methods I have it successfully containing or referring to the logged-in user's identification.

Following is the control that refers to the image field (page = advertisement.aspx):

<asp:Image ID="Image" runat="server" ImageUrl ='<%#Eval("UserId","Image.aspx?UserId={0}") %>'


Following is the successful code behind for the page image.aspx referred to above (page = image.aspx.vb):

Partial Public Class Image

    Inherits System.Web.UI.Page

    Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Request.QueryString("UserId") IsNot Nothing Then

            ' Get the connection string from Web.config.

            Using conn As New Sq

Chunking to ntext / image columns in SQL Server Compact 3.5

Hi all! I'm trying to store (potentially) large files in a SDF, via a table with an image column.  Image columns hold up to 2GB. Every SQL CE example I've found which does this reads the whole file into a Byte array, then passes the array in a SqlCeParameter.   This is fine assuming that the file is small, or the code is run on a machine with plenty of memory.  But if, for example, you're trying to store a 1GB file on a PC with 512Mb, the whole file cannot be buffered in one go (without paging). What I want to be able to do is read and store "chunks" of a file into an image col.  E.g. http://support.microsoft.com/kb/317034    I think this approach is both faster and more mem efficient.   It is possible on SQL Server 2008 etc., using either UPDATETEXT or UPDATE ... [column name].write( ..., ..., ...).   However, SQL CE doesn't appear to support either syntax. So, I guess my question boils down to: is it possible to store a 2Gb file in an SQL CE image column on a PC with 1GB of mem. (without spending ages paging) Thanks in advance, Ben.

Activiate Email forwarding with Person Group Picker field

I have inserted 3 person group picker fiels.  I need to set them up so when a user selects a user, it shoots off an email.  I was told that I can set this up in SP designer via a workflow?  If so, can anyone let me know how to set this up properly? Thanks!  Bill KreuderIm a new MS CRM Consultant that is learing all things CRM. Im very excited about 4.0!!!!

SharePoint 2007 to Access 2007 - Issues grouping by "Person or Group" field type/column

We are on SharePoint 2007 and using Access 2007.  The SharePoint list contains a column called Assigned Person, column type: Person or Group, single selection, displaying only the name 1) When we Open with Access and Export a copy of the data, then create a report from that table, we do not have the option to group on Assigned Person.  2) When we Open with Access and Link to data on the SharePoint site, then create a report from that list, when we group by Assigned Person... The same person has 2 groups - there are is no other grouping or sorts on the list, and i can't locate a correlation to another field to show why they would have to collections for the same person The Person or Group column sorts "from smallest to largest" as though it is a number field. The list is a task/activity tracking system we created custom for our needs.  We want to pull a weekly report, grouped by Assigned Person, but cannot get access to work.  We do not want to resort to anything more complex, as it takes a much longer process to have reports pulled by Chrystal or one of those types of applications.  And we cannot change out the field for something like a Choice column as the list already has a very large amount of content.  Can anyone assist? Is there a setting hiding somewhere that is causing the problem? 

Image stretch inside a grid stops working horizontally once columns are added to grid.

I have a simple setup of a window. Window contains a grid, inside the grid there is an image. I want the image to always stretch across the entire cell. I've set it's Stretch property to Fill and it works fine, as long there is only one column in the parent grid. As the window is resized, the image stretches correctly. As soon as I add another column, the image stops stretching horizontally. Vertially it works just like before, horizontally it now appears with a fixed width corresponding to the width of the picture used as the source. Does not matter which column it's positioned in, and I've tried encapsulating it into another grid but behaviour does not change. It behaves the same in both Visual studio 2010 designer and at runtime. In addition when I tried to encapsulate it in a second grid, this seond grid also now has altered behavior - instead of sizing itself to it's container (both height and width are not set) as it's parent grid does, it now sizes itself to its contents - the image. But only horizontally. What is going wrong here, is this a bug or am I missing something, and any advice on how I can get the image to fill one of the cells of a grid with more then one column?

Datareader: Set multiple random images into appropriate image field

Hi, first of all, sorry if my title isn confusing as i dont really sure the specify description regarding what i wan to do.   Now what i trying to do is, I getting 5 random images from the database, this is the code for me to get random 5 records from database: Dim command As New SqlCommand("SELECT TOP 5 Description,Image,ImageID FROM Properties ORDER BY ImageID", con)  and with the help of image handler to display it to 5 Images components i put in the page, lets say name it "Image1" to "Image5". Now the question is, how do i assign the 5 diff imageID into the 5 image components? Lets say i wan my Image1's imageID is 1, and Image2's imageID is 2. What im doing now is assigning all the same imageID to all 5 images. Below is how i assign the imageIDDim reader As SqlDataReader reader = command.ExecuteReader If reader.HasRows = True Then While reader.Read Image1.ImageUrl = "GetThumbnail.aspx?ImageID=" & reader("ImageID") & " " Image2.ImageUrl = "GetThumbnail.aspx?ImageID=" & reader("ImageID") & " " Image3.ImageUrl = "GetThumbnail.aspx?ImageID=" & reader("ImageID") & " " Image4.ImageUrl = "GetThumbnail.aspx

Why can I not group by calculated field in Date format?

After migrating to SP2010 Foundation, I've discovered that for some reason I can't group a list by a calculated date field. Ex: Create a list with a date column A. Create another column B with a simple calculated date of [A]+1 and use the field format type 'date' Modify view to group the list by column B.  You're list will load, but when you attempt to expand one of the groups you'll be greated with an exception error. Why?? Am I doing something wrong? Note: You can group fine if the data type for column B is anything except 'date' format, but I really need to group items by a calulated date. Ultimately, what I'm trying to do is group my list items by week by calculating the end of the week using a simple formula =[Must ship by]+7-WEEKDAY([Must ship by])  then I want to gropu by the [Must Ship by] column like I always did in SP 2007, but now it errors out.  I also wanted to create my own timesheet template since the Fab 40 templates aren't available for 2010, but I can't really do that effectively without being able to group timesheet entries by week.  

Sum of Calulated field in a group error when containing a value $0

Hi, I have a group which sums the total of the calculated field with expression: =SUM(Fields!MTD_VAR_CY_v_LY_D.Value) If one of the value in the child row for Fields!MTD_VAR_CY_v_LY_D.Value is 0, the group will display #Error. Anyone knows why this is the case?

Overlay Image in InfoPath with text field

Hi, We are currently designing a simple test for some employees to take and it will be delivered via InfoPath forms services. Upon successful completion of the test the userr will be invited to click a button to view (then print) their certificate. The certificate has been received as a .jpg. Is there any way to overlay the image with a text box, as this would enble the user to print a certificate where their name appears on it.

A customized EditForm.aspx page giving error because it has a "People and Group" field with a "Allow

My customized EditForm.aspx which has a "People and Group" column with the "Allow multiple selections" property as "Yes" was working fine until the Agusust cumulative update was applied into the MOSS server. Now it's giving me the error: "An unexpected error has occurred". Needless to say, when I change the "Allow multiple selections" property to "No", the customized EditForm.aspx page works fine.Forgetting whyMicrosoft introduced this error for now, is there a workaround that you are awre of?

Dynamic columns on row group page

Hi, I have a SSRS (2008 R2) report on an Olap data source. On rows I have Agents (as a row group), on columns I have Stores (as a column group) and a measure, let's say SeelOutValue. I want to see sales from agents to stores. I added a page break between each group instance on the Agent row group => one page for an Agent, but the column stores are not filtered by the Agent. I want to see on an Agent page only the stores with values. My question: can I filter the columns (Stores column group) for each Agent (row group)?  Example Dataset:             Store1 Store2 Store3 Store4 Store5  Agent1     1                   1                    1     Agent2     2         2 Agent 3  .... Now an each Agent page there are all 5 stores columns (on Agent1 page column Store2 and Store4 without data). It is possible to see on Agent1 page only Store1, Store3 and Store5 columns, on Agent2 page Store1 and Store2 columns ... ?   Thanks in advance for your help!

How to set a string field with people picker control group

Hi Guys I have a problem with a form list, when I need to set a string field with de content of people picker control that have more than one "user". Is there any way to put in string a list of user like the people picker control shows in a form? The really problem is I don't know how to read an array of user in a formula rule. any example or idea should be appreciated. tnks.  

Unable to Merge columns outside Group ? Unnecessary Row height ?

HI , In a matrix tablix , I'm unable to merge columns outside the group . Heres a quick screen shot . http://img843.imageshack.us/img843/366/samplema.png The top 3 columns is what i meant [ Unable to Merge columns outside Group ]  and Row height of the first row ? Thanks in Advance !!Rajkumar Yelugu

group only selected columns of tablix

i have a simple tablix, with item in rows and sales per year in columns...so depending upon the data available, the columns will be shown..from year 2010 back to any number of years..                   year item    2010      2009    2008    current yr   current yr + last yr 123     50           80        10            50            50+80=130 abc      119          29       40         119          119+29 = 148 now, i want to have a calculated columns ( current year sales ie first column value), (last two year sales ie first two column sum) how to achieve this.

Inserting image into oracle blob field C#

Help. How do I do this. I have spent hours trying to do this.

I have the image as a byte stream...

FileStream fs = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
byte[] b = new byte[fs.Length - 1];
fs.Read(b, 0, b.Length);

string query = "Insert into test1 (age, name, pict) values (54, 'kim', " + b + ")";

string query = "Insert into test1 (age, name, pict) values (54, 'kim', empty_blob())";
DO I NEED TO NEXT DO A SELECT TO retrieve a pointer to the blob and then fill it or something along those lines?
CODE would be very valuable!!

How to retrive client name ,Field , and Image from Database and show in datalist?


hi experts,

i wanat to display Client Name, Field and  image in datalist. Stored Procedure like this

ALTER proc [dbo].[get_clients_services]
SELECT     Clients.ClientName AS Client, Fields.FieldName AS Field, ServiceType.ServiceType AS Services, ServiceType.Servicelink AS Link, 
                      Clients.ClientLogo AS Logo
FROM         Clients INNER JOIN

FieldTypes for Multi Text and Person or Group Columns?


i am trying to insert an Item through List Web service.

i am able to insert, Text column fields. But unable to  insert an Image in Multi text line, and inserting dates for Date column,Person or Group  fields

Please suggest me on this

 XmlDocument doc = new XmlDocument();
           XmlElement batch = doc.CreateElement("Batch");
           batch.SetAttribute("OnError", "Continue");
           batch.SetAttribute("ListVersion", "1");
           batch.InnerXml = "<Method ID='1' Cmd='New'>" +
              "<Field Name='Title'>"+strTitle+"</Field>" +
               "<Field Name='MultiTextAnnouncement'>"+Announcement+"</Field>" +
                "<Field Name='StartDate' Type='DateTime'>" + DateTime.Now + "</Field>"

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