I want to display the total no. of Addition, Removals and Relocations during the past 3 months in a paticular Area.
I have written the query for this.
select q.[areaname] as Area,
classCount as TotalCount, ReqType
from ( select a.areano,
a.classCount, ReqType
from ( select areano,
count(*) as classCount, reqdtls as ReqType
from WebSummit
join RequestType
on WebSummit.reqid = RequestType.reqid
where date_created >= dateadd(mm, -3, getdate())
group by areano, reqdtls
) a
join WebSummit b
on a.areano = b.areano
group by a.areano,
a.classCount, ReqType
) p
join Area q
on p.areano = q.areano
The query works fine and has been tested. Now I want to display this in chart format.
The display should be in a chart format, one for each area showing a bar for each RequestType.
I have placed "TotalCount" in the Data Fields section and ReqType in Category fields. How do I use the Filter to set an expression so that it displays the data in a seperate chart for each Area.
I tried using =Fields!Area.Value and set it to Area1 to display only Area1 values, however the preview shows nothing.
I'm looking to build a report that is basically a series of line charts that is plotting a value over time. I can accomplish this one chart/dataset at a time, but I believe with 'List's this can be achieved in a more automated fashion.If I have some data similar to this:
I want the charts grouped by the Area_ID, and then each Location_Name is a Series in that chart. So in this example, I would end up with 2 charts (Areas 1 & 2), each have 2 series (Area 1: Site1, Site2 and Area 2: Site3, Site4)Is it possible to build this with a list? or do I need to structure the data differently?
I want to design a report in which it will contain fields derived from 2 different stored procedures. I understand a 'table' can display data from a single dataset. How can i bind these two stored procedures into a single dataset so as when i click on the table and use its property 'DataSetName', to be able to select the dataset which holds all columns from stored proc 1 and stored proc 2. How can i link multible tables ( multible stored procedures with different column names in each one) into a single dataset to feed the report?
I've got a report with a table holding a subreport that contains a number of Dundas charts. Each of these charts displays A LOT of data.
Now... after deploying the report, only a few charts at the bottom of the report are displayed -- the rest display the Image-doesn't-exist icon (File image with red X across it). Can anyone tell me what's going on? My best guess is that this is a memory issue on the server side...
Running into a quirk with creating a new dataset in RS 2005.
The dataset is based on a SQL proc, which I can identify and execute in the Data tab page and see the correct results when matched against the same params in SQL Studio.
However, the DataSets window only lists a single field call "ID" under my available fields listing, even though I can see all the correct fields in the pane right next to.
The structure of the sProc is similar to many that I have create reports on previously.
Is there a way to create an expression that references the DataSets / Queries? I'd like to be able to create an expandable text box that shows the raw sql query used to generate the report.
I am upgrading all my access reports to reporting services. One of my access reports, contains a chart which is set a a multiple chart (so I can see a chart of data for each day in the data set). Is it possible to do the same using the SQLserver 2005 chart component?....I cannot see an obvious button to press which makes a single chart a multiple one.
If this is not possible in vanilla reporting services, can anyone suggest a thrid party add-in that will rovide the functionality I want? (cheaply lol!)
I'm developing an ASP.NET application that creates on-demand reports with Reporting Services 2005 in report server. I use a custom data set that contains the data that I want to bind to the report, and I use a WebService to pass that DataSet to the reporting services to accomplish my purpose.
This works well and all the fields are displayed in the report fine except the Image Fields, that are not showing (the red X appears instead of the image).
The issue is that all the data that is bind to the dataset is contained in a SQL Server 2005 database, and the Image column in the table of that database is a VARBINARY(MAX) field (I insert the image into the database table).
Also, when I created the dataset in .NET, the column type of the dataset I declared for the Image field was Byte[], but that didn't work for me. I've also tried to declare as the field type Byte,SqlByte,Image,SqlBinary, etc without succesfull results.
I've also tried creating a XML Schema, declaring the Image field as base64Binary, then do DataSet.ReadXMLSchema(myschema) and then retrievied the data from sql server and filled the dataset, Again, the Images doesn`t display.
For finnishing my unsatisfactory tests, I've also tried to handle the image data with a MemoryStream object:
MemoryStream mem = new MemoryStream(); MemoryStream oStream = new MemoryStream();
mem.Write((Byte[])dr["Image"],0 , ((Byte[])dr["Image"]).Length); //dr is the datareader used to read from the DB
Image image = Image.FromStream(mem);
try
{
image.Save(oStream, ImageFormat.Png);
}
catch{}
newRow["Image"] = oStream.GetBuffer(); //newRow is a row of the custom DataSet.Table passed to the SSRS.
I like to get data from a signle table and arranged in hierarchical(hierarchy) order. What will be my sql script to be able to get the desired result shown below? Please include some explanation as too what script is doing..
Table Structure and Sample Data
Id ParentId Name Code DisplayOrder 1 null Group 1 G00001 1 2 null Group 2 G00002 2 3 1 Sub-Group 1 SG0001 1 4 2 Sub-Group 2 SG0002 1 5 3 Sub-Sub-Group 1 SSG001 1 6 null Group 3 G00003 3 7 3 Sub-Sub-Group 2 SSG002 2
Desired Result Id ParentId Level Name ExtendedName DisplayOrder 1 null 1 Group 1 Group 1 1 3 1 2 Sub-Group 1 Group 1 -> Sub-Group 1 1 5 3 3 Sub-Sub-Group 1 Group 1 -> Sub-Group 1 -> Sub-Sub-Group 1 1 7 3 3 Sub-Sub-Group 2 Group 1 -> Sub-Group 1 -> Sub-Sub-Group 2 2 4 2 2 Sub-Group 2 Group 1 -> Sub-Group 2 1 2 null 1 Group 2 Group 2 2 6 null 1 Group 3 Group 3 3
Any better way to query SQL 2012 to display the code of a stored proc to a single line. I'm trying to write a script to insert the contents of the procs between my devestprod environments. So people can query a single table for any proc that is different between environments. At the moment I am using the syscomments view and the text column but the problem here is if you get a lengthy proc it cuts it up into multiple rows.
I can get around it by converting the text to a varchar(max) and outer joining the query, but as you can see by my code below I have to try and guess what the maximum number of rows I'm going to get back for my largest proc. If someone adds a new one that returns 8 rows I'm going to miss it with this query.
I have this main chart setup. It pulls data from a query based on the selected parameters.
I want to create multiple charts for every catagory in the result set.
On the main chart there is a catagory called "Missing".
I want a chart for this category to display when the main chart is loaded. So below the main chart it would show a chart for each of the categories on the main chart.
Basically this report returns information on a certain part number displaying its problem types. Then I want it to create other charts for each problem type displaying the problem sub-types.
I created a report using RS with a SQL stored procedure (with date range parameters and a cursor to build the data) as the data source. When I execute the proc in SQL it returns over 300 records. When i go the the data tab on my report view the data, the proc and the preview only returns the first row. What am i doing wrong? I am new to RS.
I'm using strongly typed datasets in my first ASP.NET 2.0 web application. I come from ASP Classic, not an earlier version of .NET, and feel like I'm in another world. I'm slowly getting my head around datasets, but one thing I can't find any information on is how to read the data in a single record?I'm not talking about for next loops, or accessing row information as a repeater or other control is filled. I'm talking about reading the data returned by a method that returns a table containing a single record. This is what I have: Dim BookAdapter As New BooksTableAdapters.BooksBBTableAdapter Dim organizations As Books.BooksBBDataTable Dim organization As Books.BooksBBRow organizations = BookAdapter.GetDataByOneBook(sBookID) Dim sDropOff As String Dim sOrganization As String Dim sContact For Each organization In organizations If organization.DropOff = 1 Then sDropOff = "True" Else sDropOff = "False" End If sOrganization = organization.Organization sContact = organization.ContactName Next sBody = "Books Listing" & Chr(10) & Chr(10) sBody = sBody & "Organization: " & sOrganization & Chr(10) sBody = sBody & "Contact Name: " & sContact & Chr(10) sBody = sBody & "Email: " & organization.Email & Chr(10) sBody = sBody & "Phone Number: " & organization.Phone & Chr(10) I'm using the FOR NEXT, but this is silly since I only have one record. GetDataByOneBook(sBookID) does exactly what is says, it returns a single book with a specific bookID.Not only is this silly, it doesn't work. Using sContact as an example, it's Dim'd as a string. In the FOR NEXT loop, organization.ContactName has the right value, and it appears to be assigned to sContact correctly, but when I try to use sContact in sBody, I get an error saying that sContact has been used before it is assigned a value. Maybe the variables lose their scope outside the loop? Maybe I could get around this by building sBody inside the loop, but there has to be a better way! Diane
hi, i am having 2 columns in a table in a dataset. i want to add those two columns and bind the resultant total as a single column to the datagrid. is it possible. if yes, how o acheive this? please help me. thanks in advance. muppidi.
I'm retreiving data from a SAP BW data source. In the dataset designer I can build a query that returns a single value, the data returns successfully in the designer. When I switch to the layout mode I can place the field of the datset in table / matrix / textbox. However when i switch to preview mode or deploy the report and try to see them in Report Manager the report fails to render with the following message:
Query Execution Failed for dataset 'XXX'
These columns don't currently have unique values.
Its a single cell datset?!?!
I can successfully retreive data from other SAP Infocubes and queries. I also cannot replicate the error using a SQL Server datasource. The stack trace error looks like this:
w3wp!processing!6!5/9/2007-16:57:41:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSet1'., ; Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'DataSet1'. ---> System.ArgumentException: These columns don't currently have unique values. at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint constraint) at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign) at System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at Microsoft.ReportingServices.XmlaClient.CubeMetadataCache.CreatePrimaryKeys(DataTable table, InternalObjectType objectType) at Microsoft.ReportingServices.XmlaClient.CubeMetadataCache.Populate(InternalObjectType objectType) at Microsoft.ReportingServices.XmlaClient.CubeMetadataCache.Microsoft.ReportingServices.XmlaClient.IMetadataCache.Populate(InternalObjectType objectType) at Microsoft.ReportingServices.XmlaClient.ObjectMetadataCache.Microsoft.ReportingServices.XmlaClient.IObjectCache.Populate() at Microsoft.ReportingServices.XmlaClient.CacheBasedFilteredCollection.PopulateCollection() at Microsoft.ReportingServices.XmlaClient.DimensionPropertyCollectionInternal.Find(String index) at Microsoft.ReportingServices.XmlaClient.DimensionPropertyCollection.Find(String index) at Microsoft.ReportingServices.DataExtensions.SapBw.DataReader.FindOptionalPropertyName(String internalColumnName, CubeDef cube, Boolean fIsYukonSP1) at Microsoft.ReportingServices.DataExtensions.SapBw.DataReader.GenerateColumnInformation(CubeDef cube, Boolean fIsYukonSP1) at Microsoft.ReportingServices.DataExtensions.SapBw.DataReader..ctor(AdomdDataReader dataReader, CubeDef cube) at Microsoft.ReportingServices.DataExtensions.SapBw.SapBwCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
Any ideas why this happening and how I can get around it?
Thanks
Sanjay
ps Why would you want to put a unique constraint on a read only single table dataset?
I have an issue in generating the report in sql reporting services. I need to display a report in a table format. The datas of the table should be from two different sql tables. I have tried to write a stored procedure that returns two result sets from two different tables. As reporting services takes datas only from the first result set, i tried to write two different stored procedures each displays one result set. Then i have created two datasets with that two different stored procedure. Even then i cannot proceed as i was not able to use two different dataset in a single table because i was setting the datasetname to one dataset, when i try to retrieve the fields from another dataset i was able to retrieve only first and count values. Then i tried using sub reports. As sub reports for a dataregion(table) repeats for every row of the main report i was not able to fetch the correct datas. Atlast i have tried combining the query using join and wrote a single stored procedure. This stored procedure returns a single result set retrieves data from two tables satisfying the conditions. The issue i am facing with this is, the first table has only one row satisfying the condition and the second table has three rows satisfying the same condition, as i am using join query for the three rows returned by the second table the first table datas are getting duplicated for the rest of the rows in the second table. As I found using join query is the only resolution for the output which I need, and also I have to avoid the duplication of the records. Hence let me know for any solutions.
I have shown the sample datas that is duplicating which is indicated as bold. Phonenumber, Attemptdate and calloutcome are from first table and start time and endtime is from second table. As there are three different datas for the second table, first table datas are duplicated
What is the most efficient standalone .NET class that can hold a single disconnected record? The class must also retain column names, but other schema is not relevant (.NET data type is sufficient).If I understand System.Data.Common.DbDataRecord, it provides an interface on a DbDataReader, and has no storage of its own.I'm familiar with DataSet, is that the only .NET-standard class to do this? Thank you,Shannon
I have created a single FULLTEXT on col2 & col3. suppose i want to search col2='engine' and col3='toyota' i write query as
SELECT
TBL.col2,TBL.col3 FROM
TBL INNER JOIN
CONTAINSTABLE(TBL,col2,'engine') TBL1 ON
TBL.col1=TBL1.[key] INNER JOIN
CONTAINSTABLE(TBL,col3,'toyota') TBL2 ON
TBL.col1=TBL2.[key]
Every thing works well if database is small. But now i have 20 million records in my database. Taking an exmaple there are 5million record with col2='engine' and only 1 record with col3='toyota', it take substantial time to find 1 record.
I was thinking this i can address this issue if i merge both columns in a Single column, but i cannot figure out what format i save it in single column that i can use query to extract correct information. for e.g.; i was thinking to concatinate both fields like col4= ABengineBA + ABBToyotaBBA and in search i use SELECT
TBL.col4 FROM
TBL INNER JOIN
CONTAINSTABLE(TBL,col4,' "ABengineBA" AND "ABBToyotaBBA"') TBL1 ON
TBL.col1=TBL1.[key] Result = 1 row
But it don't work in following scenario col4= ABengineBA + ABBCorola ToyotaBBA
SELECT
TBL.col4 FROM
TBL INNER JOIN
CONTAINSTABLE(TBL,col4,' "ABengineBA" AND "ABB*ToyotaBBA"') TBL1 ON
TBL.col1=TBL1.[key]
Result=0 Row Any idea how i can write second query to get result?
Hi there, I've a complex stored procedure, which I'm trying to get a list of one or more users based the list of records that are being display. If I mentioned the overall store procedure here it'll turn you off, so I'll put the questions in bitesize chunks. Example would be if Bob and Luke work for Acrm Corp and John for Maxwellarms Ltd, and there was an intimediate table which linked both. With my stored procedure I want to display both names in the same row as Acrm Corp. Is there a way to do this? User tableUserid Username 1 Bob2 Luke3 John Store procedure resultCompanyname Username Acrm Corp NullMaxwellarm Ltd Null Regards,
I have created a new reports application project in VS 2008. I have a dataset with 2 tables: Customer and CustomerAddress with one to many relationship. I want to have a simple table in my report which displays data in the following format: Customer Name Address ---------------------------------------------------------- ABC Add1 ABC Add2
XYZ Add1 XYZ Add2
Here Address is obviously from CustomerAddress table. I have tried few options but it's mainly disgusting to work with Reports Application project when there was an amazing Busines Intelligence Reports project available in VS 2005 and equally good designer interface (Dataset, Design and Preview tabs for each report). Please give me a solution to this.
SQL Server 2005.(SP2). MS SSRS; I want to display some numbers in the same line as a concatenated string. For example a Customer may have multiple bills. These bill numbers are displayed in separate rows. I want to display them all on the same line. Example of current display: Customer Bill # ABC Company 123 ABC Company 456 ABC Company 789 etc
I want this to display as below: Cusotmer Bill # ABC Company 123, 456, 789, etc.
Is this possible in SSRS. Please help me with the syntax.
Hello. I just created separate tables for each of my categories and wanted to know how to return them all to be viewed on one page using the SQL Datasource (or whatever) This is for user accounts. I just need to know that part. Sincerely, Computergirl
I am new to Reporting service, Trying to create a report RS2005. I defined two dataset (query getting data from same database)
In report designer, I inserted a group and drap columns from first dataset. and inserted second group, when i dragcolumns from second dataset it shows like this
=First(Fields!GroupStatus.Value, "ParentGroup")
in my first group columns shows like =Fields!Member.Value
when i run the report i am getting one row in second group.
this looks like very basic mistake I am doing, since I don't have any experience in RS2005, i am posting this question,