Sign in to follow this  
Dhruva

Column3D Order By

Recommended Posts

Dear Sirs,
 
I am working with Fusion Charts, and I have a small problem I cant resolve. I have a column3D chart and in my X axis I have day of week.
My chart works fine my only problem is that I cant order the days of the week as per Monday, Tues, Wed, Thu, Fri... they come up in different order
 
I have my tables in SQL 2000 and using Visual studio C# I have the following code, which works fine:
 

ViewState.Add(

"select", "Select Count(DayOfWk) as 'Total', obroie1.Calendar2.DayOfWk, QtrWeek, obroie1.Calendar2.NumberID");

ViewState.Add(

"table", "dbo.tbl_PSC_Mailbox, obroie1.Calendar2");

ViewState.Add(

"where", "((convert(varchar(8), dbo.tbl_PSC_Mailbox.DateEmailed, 1)) = (convert(varchar(8), obroie1.Calendar2.DateEmailed, 1)))");

ViewState.Add(

"Group By", "Group By DayOfWk, QtrWeek, NumberID");

ViewState.Add(

"Order By", "Order By NumberID");

ViewState.Add(

"chartType", "Column3D.swf");
 
My problem is when I put together my query:
 
If I use the below it works, the column3D works fine but the days of the week are not in the correct order in the X axis, it shows as per sunday, wed, mon etc:

String query = (String)ViewState["select"] + " FROM " + (String)ViewState["table"] + " WHERE " + (String)ViewState["where"] + " And QtrWeek Like '" + (String)ViewState["Week"] + "'" + (String)ViewState["Group By"];
But If I add the Order by section it doesnt work anymore, like: 

String query = (String)ViewState["select"] + " FROM " + (String)ViewState["table"] + " WHERE " + (String)ViewState["where"] + " And QtrWeek Like '" + (String)ViewState["Week"] + "'" + (String)ViewState["Group By"] + (String)ViewState["Order By";

Please if you could help me to solve this problem, maybe something wrong with my sql string???

Thanks & Regards

Eileen O'Broin

 

 

Share this post


Link to post
Share on other sites

Hello Eileen,

This is most likely an issue with the query string(s). Though I am not very proficient with query strings, I suggest that you try using obroie1.Calendar2.NumberID instead of NumberID, in all the queries, and try again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this