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
831 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
ID: 38834039
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sharepoint 2013/SSRS error long reports 11 549
SSRS Dynamic Date Parameter 25 352
SQL Server 2008 R2 - Sums/Grouping 7 58
SQL 2012 R2 Express report problem 2 87
This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 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