Home » Visual Studio

Strange Color Grouping in Chart Based on Cross-Tab

I have a crystal report with a cross-tab, and a chart based on that cross-tab (Chart Expert -> Data -> Layout -> Cross-Tab). The data consists of several items with similar names, such as TestProduct1, TestProduct2, BlahProduct1, BlahProduct2 (these are the series in the chart).

The problem is that the chart assigns the same color to TestProduct1 and TestProduct2, and the same color to BlahProduct1 and BlahProduct2. Only TestProduct1 and BlahProduct1 show up in the legend, but the bars for TestProduct1 are equal to the sum of TestProduct1 and TestProduct2, and the same is true for BlahProduct1 & 2.

Here is a picture:


See how there are 7 rows in the crosstab? They are shown as only 3 in the graph, grouped by similar names.

My chart is set-up like this:
On change of: year
Subdivided by: productId
Show: cost

The ids are unique, and I can change the group that a product is placed into by only changing its name. So if I rename T3stProduk5 to TestProduct5, it will become part of the blue 'group' (and the green one will disappear).

Why is this happening?

Thank you.



Hi all,

I'm using project 2007 and have established a project the spans over many phases.  I''ve structed my tasks to be resource group specific...example

phase 1

hr group

finance group

phase 2

hr group

finance group

I'm now attempting to group and or filter.....and print gantt chart sections by resource group.......to make it easy for my users to review their tasks, I'm attempting to color code tasks and summary tasks by same color.  Any insight on how to link summary tasks to specific colored bar colors/styles

Thanks in advance



I am trying to draw a chart of type line and using the sql database to build the chart but after changes the properties of the chart to any series i am always getting the same graph which is in the bar format, i want it in line format. Can anyone help me how to generate line chart.

Here is my code:












SqlConnection connection = newSqlConnection(ConnectionString());string strCmd = "select Scenario, Coverage, CovrageDate, Pass from TestCoverage";SqlCommand myCommand = newSqlCommand(strCmd, connection); SqlDataReader myReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection);Chart1.DataBindCrossTable(myReader, "Scenario", "CovrageDate", "Coverage", "Label=Pass");SeriesChartType ct = SeriesChartType.Line;




I didn't find any resource helps me to change the color of excel chart bar as each bar color will give the user more visual effects of the status of this bar.


excel cells

A            B
Case1    70%
Case2    10% 

based on the value for each case i want to set the chart bar color of related value.

case1 bar color should be (green) as it is above 50%
case2 bar color should be (red) as it is under 50%

..........I know how i can do it from excel it self.....
But i need to do this in runtime as i'm rendering this excel sheet in c# application.
is it something related to "xlarea" ??




I am trying to place a custom template group before Word's default templates group (so that my group is at the top), in the 'New' tab of backcstage view. 

I am not able to make my group appear before Word's using insertBeforeMso. I looked through the Word Control IDs and there only appear to be three possible built-in groups for TabNew under Backstage view. (I have tried all three, and can't get my group above the buil-in templates group). :

Here is my ribbon XML snippet:

    <tab idMso="TabNew" >
        <group id="MyFileNewTab" getLabel="GetLabel" insertBeforeMso="GroupNewFormTemplates" >
            <layoutContainer id="MyTemplateLayout" layoutChildren="horizontal">
              <button id="MyCustomTemplate" style="large" label="My Template" imageMso="FileSaveAsWordDocx" onAction="LaunchTemplate" isDefinitive="true"/>          

Does anyone know how I can achieve this?
Thank you.

I have developed a report with a tablix that has 3 levels of grouping with the same chart included in the group header at each level. The goal was to show a graph at each level that summarized the detail for that level. It the lowest level, I get a get charts showing the detail information properly graphed, but the at the two higher levels I am only get a chart showing the first detail record of the overall group at the highest level of summarization instead of a chart showing the summary of detail data at the higher levels. From all that I have seen in various forums, what I am trying to do is possible. Instead of showing summarized detail at the group levels, I want to show a graph representing the summarized detail. I have tried variuos options to get the data to properly be summarized and presented, but have not had any success. I am using a single dataset that contains the detail data as the source for the tablix. Any suggestions you can provide are appreciated. Thanks.

Alright, I'm at wit's end.  I upgraded my MSSX 2008 (based on WSS 3.0sp2) to Sharepoint server 2010 via a database attach.  I sorted out all the preupgradecheck stuff and confirmed that the database upgraded status shows up as completed.  Everything seems to work fine except that when I go to Site Theme for any of the site collections that were upgraded, I do not get the option below the themes to customize the colors.  This occurs even if I've commited to the Visual upgrade (v4).  It'll let you choose an existing color theme but there's nothing below that area.  It also occurs if I create a new sub site of an upgraded site collection.  But if I create a brand new top level site collection, then I get the color customization options below the theme list.  I've confirmed in powershell that the sites in question show the UIVersion as 4 and the change flag is set to false which is normal.  I also tried forcing the Update() to run on the SPSite object from powershell as well.  I looked at one of the sites with designer 2010 and there are still some v3 files/folders in there.  I also tried the Reset to Site Definition but to no avail.

So what I'm trying to figure out is this color customization problem a bug, known issue, or a sign that my upgrade is incomplete?  Any help would be much appreciated.  Thanks.


This is the Access Cross Tab code that I am having difficutly converting to a Stored Procedure


nz(Sum([qryDELQ2a-RollMatrices].LOANS),0) AS LOANS



[qryDELQ2a-RollMatrices].[PERIOD END],








Sum([qryDELQ2a-RollMatrices].LOANS) AS [Total Of LOANS]

FROM [qryDELQ2a-RollMatrices]



[qryDELQ2a-RollMatrices].[PERIOD END],








PIVOT [qryDELQ2a-RollMatrices].DelqCurr;


Dear experts,

I have a table like following:


1                  GAS          NULL                 867

1                  WATER      45                    NULL

1                  OIL           60                    NULL

From this table i wanna make table crosstabed with product :


1                 867   NULL   NULL

1                 NULL  45      NULL

1                 NULL NULL    60


Any help appreciated,




Can anyone point me in the right direction on how to write a stored procedure to create a cross tab query within ASP.net? I can create the output I need exactly the way I want in MS Access - but can't seem to get it displayed in a grid-view within ASP.net.  Here is the sql I'm using that works in Access:


TRANSFORM Sum(EmployeeHoursTotals.Hours) AS SumOfHours
SELECT EmployeeHoursTotals.Employee, EmployeeHoursTotals.LastName, EmployeeHoursTotals.FirstName, Sum(EmployeeHoursTotals.Hours) AS [Total Of Hours]
FROM EmployeeHoursTotals
GROUP BY EmployeeHoursTotals.Employee, EmployeeHoursTotals.LastName, EmployeeHoursTotals.FirstName
PIVOT EmployeeHoursTotals.Building;


Thanks! Any help would be great appreciated!


I have a table in my dataset that has the folowing fields

ReviewID = primary Key

ClientID = ID of client

PhysicalImprovement  =  this can be 1 - 4. 1 being no improvement

IncreasedConfidence = this can also be 1 -4

I would like to have a report that totals the amounts for each field I.E


Total Clients 20             Level 1    Level 2  Level 3  Level 4 

PhysicalImprovement        3             4          7         6

IncreasedConfidence         4             2         5          9


Im sure the answer is some form of crosstab report however Im new to crystal reports and cant seem to plan it correctly

Help would be greatefully appreciated




I'm creating a cross-tab for the first time, and I'm having a bit of difficulty with two things.

1.  My columns are based on age - under 30, 30 - 39 etc.  I have sub-columns for sex.  This mines the data for people who are male, under 30 and female under 30 and so on.  Because of the subcolumn, each age category gets a total - which I don't want.  How can I suppress these subtotals - I only want the grand total showing.  I see where I an suppress grand totals, but not subtotals.

2.  My rows are based on categories.  In the database, categories  are numbered, but I want the text.  For instance, category 1 is "Full-Time" and so on.  I wrote a formula defining each category - so Full time formula is {category} = 1 - and then wrote a category for my row definition that looks something like this:

{category} = 1 then "Full-Time" else

{category} = 8 then "Part-Time"  etc. etc.

My rows are based on this second formula.  Problem is, it's automatically sorting the rows alphabetically, and I want them sorted by their original category code.  I tried the group sorting for the rows, and specified that it sort by category code (numerical).  It put the categories back in numerical order, but substituted the numbers instead of the text names I'd defined.  How do I get it to sort by the number code, but use the text name?

Any help is appreciated, thanks


Dear All,

   I have Cross Tab in a report

In database I have time in minutes. I have created a formula which converts minutes to hours.

But Summary is correct but it is not in correct format i.e, in time format for every .60 it should round to 1 but this summary is rounding 100 to 1.

Thanks in advance




I am working on a ASP.NET 4.0 application. I am returning a table from Stored procedure.

I want to form a new table and convert the row values  to column values.

for example,

If the SP is returninga table (Table1) with 5 rows and 3 columns (R1,R2....to R5 and C1,C2 & C3)

I want to form a new table(Table2) with 5 columns by populating the row values from Table1.

Is it possible to do this in SP or .NET 4.0 without looping through each row?

Aslo if the SP return more rows (15 or 20) i have to do this for every 5 rows.



Suppose I have the following cross tab report:


City Neighborhood Gender
Blocks Building
A cross-tab report for mapping a country residents, I would like to know if at run time, I can choose to hide the gender from the rows and leave the other rows (i.e. stop sorting by gender), or if at run-time I could hide the buildings and keep the blocks.

Please let me know if this is possible and where I can find examples related to this issue, I'm using VS2005 and I'm finding it really hard to find documentation containing all the features of crystal reports.

Thanks in advance. 


Hi i have the following scenario we have a table named property with intPropertyId as pk

we have two more tables 1 is custom_tables custom_columns

custom_tables have table names

custom_columns columns have column names which are user defined column with property

and finally we have a custom_columns_values table as mapped table with custom_columns

so we have intPropertyid incolumnid varValue column as column value sql_variant against every property

now i have to create report which shows column names as column names and their values as values

i have tried pivot but its not working is there any way i can print dynamic or user defined columns as columns and their values as rows


i wote this topic before at this link


i want to design it by gridview,but i think it imposible

when i made search i discoverd that cross tab of crystal report can do the same

i want do the same design at this picture

but cross-tab generate all types which have a red cirle
on the picture all to gether in one row

here is my new design of cross tab

you notive that all types shown in the same row

i want evey type show only for its product like first picture

thaks so much


Hi , I want to dispaly Crystal report in horizontal layout and new to using the cross tab. I f anyone by anychance has a working example will be glad to get it.



Sorry, if my english has some mistakes. English is not my native language. But I hope, you can understand me.

We have a strange problem with the behavior of the tab key in our developed website:

Our index-page-window is divided into 3 frames (we know frames are ugly, but customer wants it). Like that:


Inside the Logon.php, we set the focus to a textbox in a form via JavaScript.

<formtabindex="1"name="Logon"method="post"submit="return CheckLogonData(this);"action="Logon.php?Cmd=Logon"><h2style="margin-left: 39">Logon</h2><tableindent="50"class="NoBorder"><colwidth="200"><colwidth="220"><tr><td>UserId:</td><td><inputtabindex="2"type="text"class="Input"size="30"name="UserId" value=""></td></tr><tr><td>Password:</td><td><inputtabindex="3"type="password"class="Input"size="30"name="pass"></td></tr><tr><td>&nbsp;</td><tdalign="right"><buttontabindex="4"type="submit"><img src=./Images/OkU.jpg" alt="Next"></button></td></tr></table><scripttype="text/javascript">document.Logon.UserId.focus();</script></form>


After loading the page, the focus is set to the textbox for the UserId. But if we use the tab key to jump into the textbox for the password, the cursor jumps into the combobox for the URL of the displayed website?

The strangest behavior is:
1. If we click somewhere inside the the frame, where the Logon.php is loaded and use tab key after that click, it jumps correctly to the password textbox.
2. If we cycle through all element via tab key and arrive at the textbox for UserId again, hit the tab key again, then it jumps correctly

We got that behavior in following versions of Internet Explorer:

Internet Explorer 7 Version 7.0.5730.13
Internet Explorer 8 Version 8.0.6001.18702

We tried to set several values for tabindex (frames, form, input) or to use the OnBlur-Event inside the textbox for UserId to enforce jumping into password textbox. None of both helped. We tried to search the internet too, but did not find any solution.

Maybe, that is a little bug? Other browsers we tested, did not show this behavior.

Does anyone have a solution to fix it?

Kind Regards,



Hi All,

Is the Cross Hair/ Track Ball functionality is available in Ms Charts / dotnetcharting Controls

If yes then Please guide me related to this by providing a link.

Actually i am looking for a chart with following feature -


Hoping for positive reply

Kind Regards, 

Speed Dotnet


Hi, I have created a bubble chart in SSRS 2008. My datasource is AS 2005. I want my two axes to cross at 0 but I am not finding the option for that in the axes properties. I have done the same in excel where there was an option to make the axes "cross at 0". Can someone please point me how to do the same in RS 2008 bubble chart.

Thanks in advance,



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure