Solved

Create an arrayList or temp db table at runtime so I can create a graph with data not related

Posted on 2013-01-29
1
809 Views
Last Modified: 2013-01-30
Hi Experts,
I have a problem were I need to create a graph from 24 fields of data which are not related in any way apart from that they come from the same table.  There does not seem to be any way I can do this. What I want to do is create a stacked bar graph in ReportBuilder3 and compare 12 items. Each item would have a value A or B.  However since the information is not related e.g. Field1.1ItemA, Field1.2ItemB, Field2.1ItemA, Field2.2ItemB, etc, ...Field12.1ItemA, Field12.2ItemB.
They have been created in one table. Normally this would be created over two tables but due to the way the sofware works this could not be done. I am accessing data via an odbc to an SQLServerdb.
My current sql query is
Select  Field1.1ItemA, Field1.2ItemB, Field2.1ItemA, Field2.2ItemB, etc, ...Field12.1ItemA, Field12.2ItemB.
From TableAlpha

How can I create some sort of relationship so that I can a graph 12 items A vs B in a stacked graph. At moment I am looking to either create an ArrayList or create a temp db at runtime and load them in.  I don't know how to do either of these. Any guidance or examples I can view to see how to do this would be very much appreciated!.
Many thanks,
B
0
Comment
Question by:bruskhickory
1 Comment
 
LVL 6

Accepted Solution

by:
liija earned 500 total points
Comment Utility
How about this as data source query?

SELECT 'Field1' AS Description, Field1.1ItemA, Field1.2ItemB FROM TableAlpha
UNION ALL
SELECT 'Field2' AS Description, Field2.ItemA, Field2.ItemB FROM TableAlpha
UNION ALL
SELECT 'Field3' AS Description, Field3.ItemA, Field3.ItemB FROM TableAlpha
etc...
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Steps to solve SSRS SQL 2008 R2 User Access Control (UAC) Permission Error With the introduction of SQL Server 2008 R2 and Vista (Windows 7 as well) came new enhanced security features. One of the features included was User Access Control (UAC) t…
Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now