SQL Server :: Retrieving Data For Charting?

Nov 9, 2010

I need to pull data out for a chart and the following is what I have come up with. While it works I know there must be a more elegant way to get the same data in the same format.

[Code]....

MONTH P1 P2 P3
September 5 4 1
October 9 1 3

View 3 Replies


Similar Messages:

MVC - Unable To Print Charting Control On Server?

Feb 9, 2010

Trying to print an ASP.NET Charting control behind the scenes in my web app. I think it is a permissions issue with the printer as everything is ok up until the point where my code calls:

chart.Printing.Print(false);
bool finished = false;
while (!finished)
{
finished = File.Exists(settings.GetValue("statusfile")); // file which indicates document was printed
System.Threading.Thread.Sleep(1000);
}


At this point the page just freezes (or continues to load endlessly - infinite loop!) Understandably this is happening because I am 100% relying on the document being printed. I do intend to add a timeout, however, at the moment I am just trying to figure out why exactly the document is never being set to the printer!

I have given the account (which the AppPool is running under) permissions to all the relevant folders and even the pdf printer itself...Still nothing.

Am I missing something? Is there any issues with printing on the server side via ASP.NET? I have encountered some issues doing this via WindowsServices in the past not sure if it is a similar problem with ASP.NET websites.

Update

I updated the AppPool to give myself (admin) permissions and it is the same issue. So by the looks of things the job is never being sent to the printer. I can't seem to figure out why though...

Probably should have mentioned this in my original post....but I am invoking the printer through a referenced DLL, this code is not being called directly from my application (incase it matters). Also this runs fine on my Development machine which is running Windows 7 IIS7.0 where as the server is running Windows 2003 server with IIS6.0.

Update 2

I removed the while loop and just left in the chart.Printing.Print(false) line and turns out the document IS being sent to the printer. So the issue must be with the settings file not getting written which is why the loop never breaks out!

View 1 Replies

SQL Server :: Retrieving Data From Stored Procedures?

Feb 2, 2011

I need to retrieve data from a stored procedure, but not from a reader. I need to insert and read to see if there is an error code returned so I can Display It

[Code]....

This inserts data into a stored procedure, since I have a promotion going on, I want to check to see if anyone has tried to create several accounts to try to be Customer #100 or so on, I have achieved this in the procedure, and set RETURN @ErrorCode = 1

Have I Set up the SqlParameter Correctly, or do I now have to declare a direction for each parameter?

I have had problems reading from Stored Procedures and Tutorials Seam Straightforward, but thay are about readers only not Input Output

View 3 Replies

SQL Server :: Retrieving Data From FLAT File?

Jan 20, 2011

retrieving data from sql server 2000 database which has four tables. 3 of them has 256 datafields. And I need to retrieve all columns from all table for last 3years. All tables are related through a coman primary key.

So, Total data is 300,000.

View 3 Replies

DataSource Controls :: Retrieving Data From SQL Server?

Mar 17, 2010

I try to use one Calendar, i have example with XML, but i wont to read from SQL,

[Code]....

View 2 Replies

Forms Data Controls :: .net Charting Displaying A Value In A Legend?

Sep 17, 2010

Is this possible? To display a value in a legend. Here is my code:

[Code]....

View 1 Replies

Forms Data Controls :: .Net Charting Control -with Legends?

May 12, 2010

As you see above , we have more data in pie chart to plot and hence 3 DOTS appear at right bottom. Hence user cant see all the legends.Is it possible to have.say a tooltip on 3 DOTS so that when an user hovers,he sees entire / remaining legend list?

View 5 Replies

SQL Server :: Retrieving Data For A Forums Project In Posts Page?

Jan 18, 2011

I am designing a forums website. I have prepared two tables - topic and post

topic - topicid (pk),sub, message (content), replies (count of replies), catid(fk), createdby, createddate, updatedby, updatedon, viewers( count of views)

post - postid(pk), topicid(fk), post (content), createdby, createddate, updatedby, updatedon.

retrieving data from both tables in posts page where the 1st post is in the topic table and rest i.e. replies are in the post table.

View 8 Replies

Forms Data Controls :: Grouping Series In MS Charting For VS 2008?

Jul 17, 2010

Any body worked with MS Charting control for VS 2008.

I am using the chart control to displaying marks secured by students in different exams.

Series of the chart can be dynamically generated.

View 1 Replies

Forms Data Controls :: Interactive Charting Tool Method?

Jun 30, 2010

I am looking for a charting tool to generate charts in my ASP.Net page which will allow me to customize the charts to a great extent like changing the background of chart, specfying custom x and y axis and much more.Moreover, another major requirement is that the chart should be interactive enough. I would like to select data points on my chart, select a range of data points on charts by making a selction with mouse clicks and use these selections for further processing.

View 2 Replies

Forms Data Controls :: Plotting A Chart Using Charting Control?

Mar 15, 2010

I am plotting a chart using charting control. The x-values are text values and y values are date values.

If there is same text multiple times, then the plotted chart has multiple bars of same value. I want the values for the same text to be on the same bar.

View 2 Replies

Forms Data Controls :: Charting: More Than 24hours On A Time-axis?

Jan 19, 2010

I am making a chart on a asp.net page (visual studio 2010). I am "summing" time. As long as the sum is not more than 24hours, all goes well. But if the sum is bigger than 24hours, then I get a "Not a legal Oleaut date" error.

This is my code (simplified) :

Chart1.DataBindCrossTable(_dataset._table.AsEnumerable(), "factor",
"week",
"time",
"");
Chart1.Series[0].YValueType =
ChartValueType.Time;
duurhhmm is a DateTime field. "factor" and "week" are my groupings for the x-axis.

first question : what to do about the "not a legal oleaut date" ?

second question : on the axis I see 00:00,06:00, 12:00,18:00 and then again 00:00,06:00, etc... But I would like to have 24:00, 30:00.

View 2 Replies

SQL Server :: Retrieving Data From Database - To Create A New Consultation Record For A Patient?

Sep 16, 2010

I'm having a question about retrieving data. I'm using VS 2008 and I have to create a new consultation record for a patient and I've already created a database with 3 tables, which are doctor, patient and consultation.

I have 10 records saved in consultation table, and I've made a aspx form which contains a DetailsView that ask for new consultation details to be added. But I have to be able to get the doctor and patient information from the database and put in the DetailsView, then fill in the rest of the consultation details. The information entered have to be written to the database in the consultation table. But I don't know how to get doctor and patient information from database and apply them into the DetailsView so that doctor who wants to add new consultation details can select patient and doctor information from the database.

I was thinking maybe I need to do a query with insert statement and apply into the DetailView,this is the query i have:

INSERT INTO [Consultation] ([ConsultationID], [GPname], [PatientFirstName], [PatientLastName], [Height], [Weight], [IllnessDescription], [Diagnosis], [Date]) VALUES (@ConsultationID, @GPname, @PatientFirstName, @PatientLastName, @Height, @Weight, @IllnessDescription,
@Diagnosis, @Date)

as you can see, I need to get the GPname, PatientFirstName and PatientLastName from the database tables and the rest will be filled in by the doctor.

View 4 Replies

Forms Data Controls :: Unrecognized Namespace System.Web.UI.DataVisualization.Charting?

Feb 10, 2011

I'm getting a warning in my page directives saying that this namespaceystem.Web.UI.DataVisualization.Charting isn't found. I went to add a reference to the project so I could import the namespace and this namespace does not exist in the .NET tab. What do I need to do to get this working? Also, even if I add this to my Global Assembly Cache, that won't do anything for the web host web server that my website is publically on.Any guidance on this? How to get it on my local machine as well as understanding that it'll work on the actual web server?

View 5 Replies

Forms Data Controls :: Pie Chart Size In Charting / Using MS Chart Control (3.5)?

Aug 12, 2010

I am using MS Chart control (3.5), and have a requirement where I need to display 2 pie charts. The datapoints for the pie charts is set programatically. My doubts are as follows:

1. Can I display both the pie charts in a single chart control and area, or do I have to use two controls? (Currently I am using two controls)

2. How can I maintain the same size for both the pie charts? This is my main concern, since the pie sizes keep changing, depending on the number of datapoints. I tried using custom properties like "MinimumRelativePieSize", but it's not working.

View 1 Replies

Forms Data Controls :: Unable To Download Built-in Charting Controls (VS 2010 And .NET 4 Series)

Mar 8, 2011

[URL]

i m not able to download the

Built-in Charting Controls (VS 2010 and .NET 4 Series)

View 3 Replies

Failed To Generate A User Instance Of SQL Server Due To Failure In Retrieving The User's Local Application Data Path

Jan 22, 2011

i have an asp.net project in vs2010 i have a db and table inside the app_data folder, i have created a deployment package and have imported the package into an iis server that is installed on my local mechine.
now i get this error message while trying to preform an insertion.

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed
the connection string is:

Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|survey.mdf;Integrated Security=True;User Instance=True

when running it inside VS2010 it`s working fine.

View 1 Replies

SQL Server :: Retrieving Posts By Their Tag?

Sep 18, 2010

I have the following code in a stored procedure to retrieve all posts:

[Code]....

However, I am having trouble selecting posts by their tag..

View 9 Replies

Forms Data Controls :: How To Use Charting Controls

Jul 19, 2010

I have the charting working very basic. I would like to learn how to use the control more fully. I find the system to be totally inadequate.

View 7 Replies

Storing And Retrieving Images With MVC And Sql Server?

Jan 15, 2010

I am designing an prototyping an app the needs to store images, similar to facebook. This will be a public facing site and I am not sure how many users I will end up with but what I am looking for is a way to efficiently retrieve them.

So far I am thinking of storing them in SQL Server varbinary columns. I have the upload code and the storage code for that. My concern is retrieving them. I can retireve and build the image tag on the fly but I am worried about having to hit the database for each one.

I have been thinking about getting all images for a user and caching them in the asp.net cache for 10 to 30 seconds. I have never had to do something like this so I would be interested in hearing a few different approaches. Obviously the images can vary in size and I was thinking about defining a size limit, but I haven't gotten that far yet.

View 3 Replies

SQL Server :: Retrieving File From Database?

Sep 9, 2010

i saved files into database. when i'm displaying i wrote code like this

Dim mySqlDataReader As System.Data.SqlClient.SqlDataReader
Dim mySqlCommand As New System.Data.SqlClient.SqlCommand("pl_Resumes", mySqlConnection)
mySqlCommand.CommandType = CommandType.StoredProcedure

[code]...

View 13 Replies

SQL Server :: Retrieving Instance Name From Network Using C#?

Dec 16, 2010

I know how to retrieve sql server instance name from network,but i want to know is there any way to make sure that while retrieving which should not retrieve the sql server with express edition.

View 19 Replies

Web Forms :: Image Retrieving From Sql Server?

Aug 25, 2010

how to display image in image control on web page and also in gridview.In sql server image data type is "image".

View 3 Replies

SQL Server :: Retrieving ID Field After Insert?

Dec 29, 2010

I am trying to retrieve the ID (auto incremented) form a Table after I do an insert. I have tried using one of the Variable I used to insert with no success. I am inserting a record with Todays Date (if one does not allready exsist) then trying to read that record to get the AutoInc number (DailyTimeRecordID). Where am I going wrong?

Here is my code

[Code]....

View 3 Replies

The Type Or Namespace Name 'Charting' Could Not Be Found?

Jan 11, 2011

I am getting a strange error over one site vs another. I have created a chart web site that works, but now I'm moving that code into an existing website. I'm getting this error (see title) and cannot figure out why. The references are the same and I have the using directives the same (as far as I can tell). I'm stumped.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.DataVisualization.Charting;
using System.Data.SqlClient;
using System.Drawing;
using System.Data;

...

Charting.Title vbTitle = new Charting.Title( ddlSchool.SelectedItem.Text.ToString() + " Logins per Hour" );

...

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved