Use DataTable/DataSet As Source To Report

Mar 31, 2008

Hi,

Is it possible to use datatable/dataset as source to a report in Reporting Services. That is possible in e.g. Crystal Reports. I can only find Report Server Model and XML as non-database sources.


Best regards
Lars

View 10 Replies


ADVERTISEMENT

Passing Parameters To DataSet Useb As Report Data Source

May 21, 2007

Hi guys,



How can I pass a parameter used for the DataSet query? I'm using this DataSet file as data source of my .rdlc report for Windows Forms.



I've already done a .rdlc report to Web Forms where I passed the query parameter by ObjectDataSource.SelectParameters, but in Windows Forms this object was not created. I just hava the following created objects:

- despesaTableAdapter (from myDataSetTableAdapter)

- despesaBindingSource (Windows.Forms.BindingSource)

- RelatorioDataSet (from myDataSet)

- relatorioDataSet1 (from myDataSet)



Any help will be very appreciated.







Tks and rgds,

Luis Antonio

View 1 Replies View Related

DataSet Works... DataTable Doesn't... (ODBC)

Jun 21, 2007

I have a longstanding problem where Stored Procedures or complex T-SQL called from VB.NET will not populate a DataTable object, but will work fine with a DataSet.  For example:    'oConn is defined elsewhere...        Dim sErr as String = ""        Dim dt As New DataTable        If Not oConn Is Nothing Then            Try                Dim sSQL as String = "select 1"                Dim oCommand As New OdbcDataAdapter(sSQL, oConn)                oCommand.Fill(dt)            Catch ex As Exception                sErr = "Database Error: " & ex.Message            Finally                sqlCloseConnection(oConn)            End Try        End Ifthis works fine and my dt DataTable object gets one row.  However using this as the SQL:                Dim sSQL as String = "declare @foo table(mycol integer);insert @foo select 1;select mycol from @foo;"does not work.   It executes with no errors, but the DataTable has no rows.  Finally, if I replace the DataTable with:                Dim ds as DataSetI can then get the data in ds.Tables(0) no problem.So, if the results of the sql are a single result table being put at index 0 of a DataSet, why are they not being put in a single DataTable?When a sql is a simple select statement it always works directly to a DataTable.  Only when it's a SP or sql with some logic does it require the DataSet approach.  This is a reporting utility so I need to standardize the code though the sql will be dynamic. Any ideas?  

View 1 Replies View Related

Load Result Sets From Mysqldatareader Into Datatable Or Dataset

Nov 8, 2007

hi all.....
i select some records from my database using mysqldatareader.......but i want to load it's result sets into my datatable or dataset....
is it possible and how can i do it this way ?
thanks

View 1 Replies View Related

Putting Data From DataTable/DataSet Into SQL Server Table?

May 5, 2005

Hello,
I created this DataTable, add rows of data to it, and then display the data on to a form via a repeater.
Dim ds As DataSet = New DataSetDim dtTableName As DataTable = New DataTable("dtTableName") dtTableName.Columns.Add("Description")dtTableName.Columns.Add("ItemNumber")dtTableName.Columns.Add("Quantity")dtTableName.Columns.Add("Price")ds.Tables.Add(dtTableName)
What I need to do now is create a table in SQL Server and update the database with the data I've collect in my dataset. How do I bind and update this data to a sql server table?
Thanks!James

View 1 Replies View Related

T-SQL (SS2K8) :: Hierarchical Update Dataset - Refresh Datatable After Delete

Feb 5, 2015

Imagine the following scenario: two tables (say, "requests" and "details") are joined in a 1:n relationship on MSSQL 2008. Both tables contain an ID (autoincrement field) and a timestamp field for proper concurrency management. Data access in the frontend is provided by a typed dataset in VS 2010. There are SPs on the server which select, update, insert or delete data in each of the two tables (so, 8 SPs alltogether: uspRequestsSelect, uspDetailsInsert etc.). These SPs are used for data access in the dataset. The GUI is a Windows form with 2 datagridviews, one for request datatable and one for the child-relation-based datatable FK_request_details. So, each request shows its details. The form works well so far.

Now, trouble strikes. A business rule says: "the first details row of a request (=row with lowest ID) always has a 0 in column "additional fee". For additional detail rows, this field has to be set to constant value 45". In short: the first detail row of each request is free, second and later details are charged 45 €.

So, I created a SP "uspRequestFeeManager", which recalculates all (!) detail rows of a request. This SP is called in uspDetailsInsert, uspDetailsUpdate and uspDetailsDelete, as each of this cases causes the additional fee to be recalculated for all rows (as rowcount can change). In Management Studio, this works as well!

But: as the uspRequestFeeManager changes data even for rows the user did NOT touch, there's a concurrency exception in my frontend in the following case:

In a request with 2 detail rows (first row has fee = 0, second = 45), the user deletes the row with fee = 0. Committing via TableAdapterManager calls uspDetailsDelete, which calls uspRequestFeeManager, which sets the remaining single details row to a fee value of 0 (which is correct!). This causes TableAdapterManager.UpdateAll to fail ("concurrency exception; delete command has handled 0 of 1 expected records"), as uspRequestFeeManager has "edited" a row which the user didn't touch, and thus updated its timestamp as well. So, the list is out of sync.

The uspRequestFeeManager looked like a good idea... but it seems not to be.

Approach would be: instead of calling the uspRequestFeeManager from within the SP, call it programmatically after TableAfterManager.UpdateAll, and after that, 're-fill' the details datatable with the updated data. But that would transfer business logic from server to client. I don't like that...

View 3 Replies View Related

Listing Datasets In Report (dataset Name, Dataset's Commands)

Oct 12, 2007



Is there any way to display this information in the report?

Thanks

View 3 Replies View Related

Filling A DataTable From SqlQuery : If SqlQuery Returns Null Values Problem Ocurrs With DataTable

Sep 3, 2007

Filling a DataTable from SqlQuery : If SqlQuery returns some null values problem ocurrs with DataTable.
Is it possible using DataTable with some null values in it?
Thanks

View 2 Replies View Related

Connect To A DataSet Variable As A Source?

Apr 16, 2007

Hello. I€™m new to SSIS. This forum and Kirk Haselden€™s book are my teachers. I€™m having a hard time grasping something basic to get started defining a set of packages to automate the ETL process, however, and perhaps I€™m simply misunderstanding the best practices of SSIS.

I have source data in two different transactional databases, and use OleDb connection managers (and OleDb Source components in the Data Flow) to extract the data. I use a Script Task and several Lookup widgets in the Data Flow to transform the data, and output each to two different package-scope DataSet variables.

How do I join these two datasets in a third Data Flow task for loading into my data warehouse? It seems I can iterate through them in the Control Flow, but I can€™t write a query against them in the Data Flow, since there is no connection manager that allows me to €œconnect€? to a package-level variable. Should I instead be storing my extracted, transformed data in temporary database tables, and then joining these to do the final load?

Any advice greatly appreciated. Thanks in advance.

View 1 Replies View Related

Adding DataSet As DataSource To Report Published On Report Server From ClientSide

Jan 15, 2007

Hi

I am Creating Click Once Windows Application with Reporting Services 2005.I have created Report and Published on Report Server.In my windows application I am successfully able to view my published report through report viewer control.

Now in my application I am getting a dataset from my custom webservice. I want this dataset data to be added to my report as datasource at runtime on Client Side ,as my report is on Report Server.

waiting for help!!

Thanks in Advance

Pankaj

View 8 Replies View Related

T-SQL (SS2K8) :: Finding Out Missing Segments From Source Dataset

Oct 23, 2014

I have 2 tables, #MainSample and #SampleCode

In the #MainSample, Line_ID is the Primary key

Line_ID BegMeasure EndMeasure

656 0.00 254500.00
657 0.00 7000.00
658 0.00 308000.00
659 0.00 20000.00

#Sample Code

Line_ID BegMeasure EndMeasure Code

659 665.00 9456.00 APL-XL
657 0.00 200 BHP

From this, I have to find out the segments for which there is no defined code value. I want the output as

Line_ID BegMeasure EndMeasure

656 0.00 254500.00
657 200.00 7000.00
658 0.00 308000.00
659 0.00 665.00
659 9456.00 20000.00

How to achieve this?

View 0 Replies View Related

Reporting Services :: SSRS Shared Dataset As Source For SSIS?

May 12, 2015

Could we use SSRS Shared Dataset as a source to the SSIS package?

View 3 Replies View Related

Pass Dataset From Main Report To Sub-report

Apr 17, 2008

Hi

Don't know if this is possible or not - Need to produce a report and the main report has a grid in it.

For every row in the main report, in one of the grid fields there are n images. So to do this, I am using a sub-report. But there is a problem with going to the database for every row to fetch images that if the user does a report spanning more than about 6 months, there will be thousands of records each with the potential to have many images and the constant round trips to the db server would probably kill it.

So what I want to achieve is to fetch the dataset in the main report with just one trip to the database and then pass the dataset filtered by a uniqueidentifier to each row of the subreport.

Could someone please let me know if this or something like it is possible and how to go about it?

Thanks
Steve

View 5 Replies View Related

Reporting Services :: SSRS Dataset Query Design Error Source

Nov 3, 2015

When  I click on the DataSet Query Desginer there is an Error Source:.NetSqlClient Data Provider. why this error comes and I have executed the SQL query in SSMS succesfully and the result comes. However this is causing the report from the report manager to fail.

View 8 Replies View Related

An Error Has Occurred During Report Processing. A Data Source Instance Has Not Been Supplied For The Data Source DetailDS_get_o

Mar 13, 2008

hi ,

i am trying for a drill through report (rdlc)

ihave written the following code in drill through event of reportviewer, whenever i click on the first report iam getting the error like

An error has occurred during report processing.


A data source instance has no
t been supplied for the data source "DetailDS_get_orderdetail".







the code is



using System;

using System.Data;

using System.Data.SqlClient;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

//using Microsoft.ApplicationBlocks.Data;

using Microsoft.Reporting.WebForms;

using DAC;

public partial class _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

ReportViewer1.Visible = false;

}

protected void Button1_Click(object sender, EventArgs e)

{

DAC.clsReportsWoman obj = new clsReportsWoman();

DataSet ds = new DataSet();

ds = obj.get_order();

ReportViewer1.LocalReport.DataSources.Clear();

ReportDataSource reds = new ReportDataSource("DataSet1_get_order", ds.Tables[0]);



ReportViewer1.LocalReport.DataSources.Add(reds);

ReportViewer1.LocalReport.ReportPath = "C:/Documents and Settings/km63096/My Documents/Visual Studio 2005/WebSites/drillthrurep/Report.rdlc";

ReportViewer1.LocalReport.Refresh();

ReportViewer1.Visible = true;

}

protected void ReportViewer1_Drillthrough(object sender, DrillthroughEventArgs e)

{

DAC.clsReportsWoman obj = new clsReportsWoman();

ReportParameterInfoCollection DrillThroughValues =

e.Report.GetParameters();



foreach (ReportParameterInfo d in DrillThroughValues)

{

Label1.Text = d.Values[0].ToString().Trim();

}

LocalReport localreport = (LocalReport)e.Report;

string order_id = Label1.Text;

DataSet ds = new DataSet();

ds = obj.get_orderdetail(order_id);



ReportViewer1.LocalReport.DataSources.Clear();

ReportDataSource reds = new ReportDataSource("DetailDS_get_orderdetail", ds.Tables[0]);

ReportViewer1.LocalReport.DataSources.Add(reds);

ReportViewer1.LocalReport.ReportPath = Server.MapPath(@"Reportlevel1.rdlc");

ReportViewer1.LocalReport.Refresh();





}



}

the code in method get_orderdetail(order_id) is

public DataSet get_orderdetail(string order_id)
{
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
cmd.Parameters.Add("@order_id", SqlDbType.VarChar, 50);
cmd.Parameters["@order_id"].Value = order_id;
ds = SQLHelper.ExecuteAdapter(cmd, CommandType.StoredProcedure, "dbo.get_orderdetail");
return (ds);
}pls help me.

View 1 Replies View Related

Reporting Services :: Set Data Source In Report Manager For Whole Folder Rather Than Each Report?

Aug 28, 2015

I have few reports under different folders in Report Manager. Is there a way to set the data source for the whole folder rather than each report individually? There is also a folder where reports generate dynamically. Since the report project doesn't exist anymore, I can't set the data source through code. How can I set the data source for the whole folder?

View 7 Replies View Related

How To Run Rdl Report From .net Using Dataset.

Oct 8, 2007



Hi
Is it possible create Reporting Svcs (RS) report with coding in .net assigning dataset to it....
how to run RS report with windows form through report viewer
I have tried to find a solution but so far, no luck.
Anyone have any ideas?

View 1 Replies View Related

2 Dataset In 1 Report

Mar 10, 2007

Hi all. Is it possible to create 2 dataset in 1 report in Business Intelligence Project? I tried to make 2 datasets but if I ran the report it occurs an error. It only ran for 1 dataset.
any thoughts please.

thanks.
-ron-

View 2 Replies View Related

Link Two DataSet In The Same Report

Apr 11, 2007

Hi !
I use ms sql server 2005, and I have a problem
I have a dataBase where I have a lot of data, I have a webServices which calculate indicator for a time period and an id indicator. The time period must be specific and choose by the user, so I can't dto automatically by integrating the data from my webService in a dataBase (with IntegrationServices).
So I create a report with 2 dataset, one which recover the indicator value for each equipment (the webService send a list of {<idEquipment> and <value>}) , and I want to link the idEquipment with the IdEquipement in my dataBase, it would allow me to know other informations about the equipment :
equipement ID | Indicator value (from webServices) | equipment name | eq number | cumul of event duration for this eq....
All in the same grid...
Does it possible ?
If it is possible with the report designer, does it possible with report builder, as report builder need a model, how can i do to make a model from 2 dataSource...
thank you for your answer...

View 6 Replies View Related

Designing A Report Without Dataset

Jun 12, 2007



Hello



We are trying to create an app where we pass dynamically a dataset (from our form in C#) to our {report}.rdl file.

We are having doubts about something.

How can we design the actual report if we don't have the datasource until runtime? The reason to do this is due to our complex calculations of data which becomes almost impossible to achieve in a T-SQL environment.

I know with a lot of patience and time (we don't have both) we can achieve it, but even though, we would need to process some data in the client side.

So, the question is... is it possible to design a report without a Dataset? I know we can drag the controls on the layout window, but we won't be able to test it. IS there any workaroung about this?



Thank you

View 3 Replies View Related

Create Report With An ADO Dataset

Aug 23, 2006

Hello,

We are trying to convert our Crystal XI reports to SQL Reporting Services 2005. Our crystal reports get their data from ADO datasets which are populated through code at run time. Is it possible to do this in SQL Reporting Services?

The only options for a dataset seem to be query and stored procedure. When i have a blank dataset it throws an error. When i try to link my dataset to code, it throws an error.

Thanks for your help!

View 7 Replies View Related

How To Use Two Dataset On SQL Server Report

Feb 22, 2008

Hi Guys,

I just designed a report using SQL Server Reporting 2005 in which I have used two datasets. I am able to bind fields of one dataset but other dataset fields are not visible. When I try to bind the field of other dataset it gives me error that the field is not found. If I bind the field by using the Aggregate function it is bind correctly because we specify the dataset name with field in the function. But I do not want to use Aggregate function. How can I use two dataset for single report?

Waiting your response

View 5 Replies View Related

Passing A Dataset Programmatically To Report

Oct 5, 2007

HI everyone;
i have a problem , is there a possible to pass a dataset to a ssrs report programmatically ?
or at runtime without specifying it at design time ...

View 1 Replies View Related

Dynamically Assigning Dataset To A Report

Jan 31, 2008



Hi All,

How to assign dataset(meaning SQL Query) to a report at RunTime. Please help me in doing this it's urgent.

-SR

View 4 Replies View Related

Preview Report Without Executing DataSet

Feb 29, 2008



Is there a way of previewing a report without executing the dataset? Problem is when I make changes to the layout of the report it is taking a while before the report renders.

While I am developing my reports and working on the layout, changing colours, fonts etc it would be good to have an option which uses local data only.

Is there an option like this?

View 3 Replies View Related

Displaying DataSet Query In Report

Oct 16, 2007

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.

View 4 Replies View Related

Report Dataset Execution Sequence?

Dec 20, 2007

Hi all,

When we use more that one datasets in report, how can we know which dataset will be executed first.
For example if we have added 2 datasets (dataset1 and dataset2) and both of them are using stored procedures.
How can we know whether dataset1 will be executed first or dataset2.

In my case I need to execute one dataset first that loads data to database tables and then want to execute second dataset that calls stored procedure that depends on table data there were filled by first dataset.

Thanks,
.....Hinesh

View 1 Replies View Related

How To Find The Rowcount Of The Dataset In A Report

Mar 28, 2007

I have a report.

In one of the text field i have to show the rowcount of the dataset

How can i do that

View 5 Replies View Related

Passing DataSet To MS Access Report

May 28, 2007

I have many MS Access reports that process recordsets obtained from a MySQL database, based on a user-selected date range. This uses VBA and input boxes. I'm now creating .aspx pages to get the user input via the web, and am successful in creating a DataSet. My .aspx.vb code includes using Automation to open the Access report in Snapshot Viewer (DoCmd.OutputTo). How do I pass the DataSet to MS Access to replace using recordsets?



My VBA code in Access used to be this:




Code Snippet

Dim ws As Workspace
Dim strConnection As String
Dim dbs As Database

Dim rst_chg As Recordset

Set ws = DBEngine.Workspaces(0)
strConnection = "ODBC;DSN=xxx;DATABASE=xxx;" _
& "SERVER=10.1.144.xxx;" _

& "UID=xxx;PWD=xxx;PORT=xxx;OPTION=0;" _

& "STMT=set wait_timeout=100000;;"




Set dbs = ws.OpenDatabase("", True, True, strConnection)

Set rst_chg = dbs.OpenRecordset("SELECT ...")

'process the recordset ...




I'm thinking I should be able to eliminate most of this code and Set rst_chg = DataSet. I've been successful with using WriteXml in the .aspx.vb page and Application.ImportXML in my VBA to pass the data using XML, but this writes to the hard drive, and also creates a database in Access (overhead I would rather not have to deal with). Again, is there a way to open the DataSet directly in my VBA code?



Thanks,

Guy Rivers

View 1 Replies View Related

Is It Supported To Use OpenXML In A SQL Report Dataset?

Oct 26, 2007



I have a table in SQL that stores XML code in one column. I use OpenXML to parse the XML data and then I store the parsed data into a SQL temp table so I can join it with other tables in the SQL DB. My query works great in Query Analyser, but when I paste it to a DataSet there seem to be a conflict with the variables and parameters.
I have other reports that use temp tables and it works fine, so I was wordering if OPENXML is supported in a dataset.

Thanks, Susan

View 1 Replies View Related

Creating Dataset For Report - Percentages In Result

Nov 3, 2015

Trying to create a dataset for a report. I need to bring back percentage in the result set. The fields that I am using to get the percentage have valid data but the result field is 0.00%. Is there reason I cant bring back a percentage field?

Code:
SELECT JobNum, Mailed, LT_7, BT_6_10, GT_10,
Format([LT_7]/[Mailed], 'p') AS PctScaned1,
Format([BT_6_10]/[Mailed], 'p') AS PctScaned2,
Format([GT_10]/[Mailed], 'p') AS PctScaned3,

[Code] ....

View 3 Replies View Related

Urgent! Report Server Bind Dataset

May 22, 2008

Hi Everyone,

I have used the StoredProcedure as shown below:

Begin

Select a.Field1,b.Field from table a, table b where a.patientid=@patID
if(@select=1)

select a.Field1, a.Field2 from table a

else if(@select=2)
select b.Field1, b.Field2 from table b
end

When I bind this storedprocedure with Dataset, all the Fields Corresponding to table a and table b are displayed in the Dataset.Finally, when i bind this Dataset with my chart, the fields corresponding to table b are not displayed in the Chart.
The reason for that may be because Report Server cannot bind with multiple Datasets? Please Clarify.
If the Report Server cannot bind with multiple datasets, then how to call different StoredProcedures (according to Criteria) in a Single Report in Report Server project?

Thanks
Navdeep

View 4 Replies View Related

Images (in Dataset) In Report Headers/Footers

Apr 7, 2008



I have an image stored in a dataset that I would like to place in the page header and footer. Unfortunately dataset fields can not be placed in headers/footers.

Embedded pics in the project and/or report are NOT an option as the report must pull the image from the database. UNLESS there is a way to embed it FROM the dataset.

Normally I use =ReportItems!FieldName, but this doesn't seem to work when dealing with images.

I put the image in the header row the table holding the report information, but there are some pitfalls. Consider the following: put the Image in the top left cell of the header rows (A1) , put my Report Title in Cell (A2) and finally put =Now() in cell (B2).


When the report renders Cell (A1) has grown to accomodate the size of the image, Cell (A2) is fine, but cell (A3 - the date-) is pushed down...as expected (boooo!)

I used the following function =Fields!ReportTitle.Value & chr(10) & chr(13) & Fields!ReportDate.Value in (A2) a slick solution, but the padding is different and I need different font sizes and weights. (...almost)

I moved the image in (a1) and the rest of the fields following respecfully (B1, C1, D1...) but with parameters the header is now practically half the page (...ok so that was a bit of an stretch)

I tried the RepeatsWith property and couldn't get it to work???? Am I using it correctly? I have a table in the body of a report (table1). Above it, I place the image. In the image properties, I choose RepeatWith and select table1, I expect to see the image repeat on each page, but that is not the case. I'm probably missing a simple explanation.

I even tried to pass the image as a parameter. URRRNT! At least with my experience.

Have I exhausted all possibilities without extensive code?

All I'm trying to do is line up the Image with the report Title/date/parameter values in the HEADER making the report look pretty.

Thanks for the help...

SSRS 2005 User

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved