.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

Displaying data from two years on same chart

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Sql Server

I want to display sales data by month from the current year and the previous year on the same chart.  I've created two data sets, each of which has [month] as one of it's members.  I set up the chart with two different Values members: Current & Previous and one Category group: Month.  The current year data displays as expected but the previous year just shows as a straight line across the chart.

Can I get both sets of data to display on the same chart?

I tried building a single query that would return a single dataset with two values, one for current year/month sales and another for previous year/month sales but my MDX isn't that good so I ended up with different queries.

View Complete Post

More Related Resource Links

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!

Displaying Data using ASP.NET 2.0 Repeater and C#

This tutorial will show you how to display data using the .NET Repeater Control, ASP.NET 2.0 and C#.NET

The Repeater control is a powerful tool and is easy to use.

First, you will need to import the System.Data.SqlClient namespace.

Data form web part not displaying - Unable to display this Web Part. ....



I am designing a data form - adding some formatting etc.  I am able to see the webpart correctly in SPD split view, but when I trying to preview it, it gives me the following error

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.
ANy help would be welcome, I have spent a lot of time on this page and don't want to do it again.  THere are a lot of fields and it's a tedious process to move them to the correct location.  I am at my wits end, I am not sure how to debug this!!


Displaying a Parameter Value in the report footer that corresponds with the parameterized data on ea

I've got a report that has only one parameter, it determines the department (or departments) to base the report on, the parameter is set to allow for multiple values. The report returns only on page per department, so the report could be anywhere from one to a hundred pages, one page per department. I've included a text box in the report footer that displays the report name and the parameter value, the expression looks like this: =Globals!ReportName & " For Department " & Parameters!Dept.Value(0)    I know that in this example the zero inside of the parenthesis of the parameter value is what is returning the actual value when the report is rendered, and I understand that the zero is value in the array of parameter values. What I'm looking to do is adapt this expression so that the parameter value rendered on each page corresponds with the data (departement) displayed on the specific page. So using the example of the data, if the user selected three departments in the parameter drop down, then each page that displayed the different department’s information would also display that departments name in the page footer text box. I'm thinking that each time a page is rendered that there is a group or global variable that can be called to provide this dynamically but I can't seem to find the information. Appreciate any help, Dan

reporting services xy scatter chart with three data series

Hi, I have a report that includes an XY scatter chart with three data series.  Two of the data series are + and - tollerance bands and the thrid data series is the test points.  The data displays in the graph but I only seem to be able to get all three series to display as a line or all three to display as data points.  I need the tolerance bands to be a line and the test point to be displayed as data points without a line joining them up. Please can you provide a solution.   Thanks

Filtering Chart data based on querystring

i need to present chart that is based on the list but i need it filtered by query string. is this even possible to do?

Displaying a count of records in a Data View Web Part outside the web part itself?

I have a DVWP with 400 rows. I have these inside a Div tag, which makes it scrollable. I also have several URL filters set up to show certain records. I would like to add the count to the page to display the number of records when the filters are activated. I have added the View Footer to the DVWP but this just gets placed at the bottom (still inside the Div tag). It would also be cool to be able to do counts with criteria so I could do comparisons (ie, 50 records overdue/400 total etc). Thanks

How to align data in Chart legend in SSRS 2008?

Hi,I have created a chart of type 3D pie.  I put a String field for Category and Sum(numeric field) for Data.I wanted to show the legend as Category field and Data field and it's displaying as i set.Now how to make alignment of Data in legend, so that my numeric fields should align Right and String field should align Left.  I can make whole legend alignment but I want to make only the numeric field in the legend to align Right.Is it possible or there any work around?Please let me know.

Gridview Not displaying data

I'm trying top populate a gridview after the user clicks a button.   In the button_click event handler I'm fetching the info I want to display on the grid. this is the code I'm using to do it...   <asp:Button ID="btnSearch" runat="server" Text="Search"    onclick="btnSearch_Click" /> protected void btnSearch_Click(object sender, EventArgs e)        {            String strSearchCategory = SearchCategoryDDL.SelectedValue.ToString();            String strCategoryValue = CategoryValueDDL.SelectedValue.ToString();             PopulateContactGrid(strSearchCategory, strCategoryValue);        }         protected void PopulateContactGrid(String strSearchCategory, String strCategoryValue)         {            String sql = String.Format("SELECT * FROM [tblContacts] where {0} = '{1}'", strSearchCategory, strCategoryValue);             String strconnectionString = Web

Problem with displaying and processing dynamic data


I need to dynamically generate a list of images in table format.  The images can be found in either art or picts, in temp, or in temp and in one of the other two (duplicate image). 

The idea is to display any duplicates prior to copying anything over from temp to either art or picts, so I'm thinking of adding radio buttons if the same image is found in two folders.  I also want to add a submit button.  The user selects the image they want and clicks the button.  If they want the new file it's copied over then deleted.  If they want to keep the existing file the new one is just deleted.  If they select nothing, both versions of the file are deleted.  So the table will look something like this:

temp         art            picts         process
z-123                                           delete button
() z-234                       () z-234  

Is there any other way of displaying data not using .net controls?


I don't wan to use any .net data controls, like listview, gridview etc.

I'd like to do presentation layer in .aspx, and all the logic in c#.

Should I use expression builders to do so?

Help with tutorial Displaying Binary Data in the Data Web Controls



I am going through the ASP.NET tutorials and my questions is how do you assign an image to a byte array. Because the example in the tutorial is getting rid of an OLE Header. My Database images, does not have an OLE Header. So how do you augment this code to work for my situation:

protected void Page_Load(object sender, EventArgs e)
 int categoryID = Convert.ToInt32(Request.QueryString["CategoryID"]);
 // Get information about the specified category 

CategoriesBLL categoryAPI = new CategoriesBLL();
Northwind.CategoriesDataTable categories = categoryAPI.GetCategoryWithBinaryDataByCategoryID(categoryID);
Northwind.CategoriesRow category = categories[0];

 // Output HTTP headers providing information about the binary data
 Response.ContentType = "image/bmp";

 // Output the binary data
 // But first we need to strip out the OLE header

 const int OleHeaderLength = 78;
 int strippedImageLength = category.Picture.Length - OleHeaderLength;
 byte[] strippedImageData = new byte[strippedImageLength]; 
Array.Copy(category.Picture, OleHeaderLength, strippedImageData, 0, strippedImageLength); Response.BinaryWrite(strippedImageData);


Managed metadata column not displaying data



We are in process of rolling out our new intranet on SharePoint. Two days away from the launch we have run into a strange problem. We have various custom content types and within that we have custom columns which are managed metadata. The columns are then exposed in various document libraries and users choose appropriate metadata when adding the documents to the library. Everything was working fine, until yesterday all of a sudden we were not able to see any data in the columns which were managed metadata columns. But if we edit the properties of the document we can see the field is populated.

Another strange thing is that if the user has full permission in central admin they can see the metadata in the columns, but anyone else (including site owners) cannot.

Can anyone please shed some light on this and if someone knows how to resolve this?



GridView data to Chart Control


I have a GridView that is filled with databound data.  My problem is that I have a template field that uses the index + 1 for the gridview to give each record a unique number.  Then with this Gridview, with BoundFields and TemplateFields, I want to have this data to be the data for the chart control series.  How exactly is the best way to go about this?

Thanks in advance. :)

Displaying column data from another source?


 I have a gridview databound to a database table, and i want to make a gridview column display data that is accessed using the primary key data from the databound source to address a table which is not the one databound - how would I do this please?

SSRS Chart calculation displaying future values


I'm new to SSRS and especially to the chart features.  I currently have a line graph chart where the data points are based on a % calculation for each month of a year.  The prior years are all displaying correctly. 

The current year however shows the correct values to the present date, but rather than stopping it continues the line to the end of the chart showing the most recent value.

What can I change so that it will stop the line at the most recent data point?

The calcuation being used is "=1-(Fields!ID2009_Backordered_Lines.Value)/Sum(Fields!ID2009_Fillable_Lines.Value)"

Any insight would be appreciated!







how to show specific data label or legend in the line chart


I have a line chart with date (X axis) for average numbers. I wanted to show only one number for the month at the chart or legend area. But i can show or hide whole data labels. Is it possible to have an expression box in chart area?

Thanks in advance,


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