473,395 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Custom Dataset Processing Extension Regisration

I created a middle tier component that produce dataset from database
for sql reporting services but i can not open connection

details:

middle tier component which name is MyReports.dll

using System;
using System.Data;
using Microsoft.ApplicationBlocks.Data;

namespace MyReports
{

public class myData
{
public myData()
{}

public DataSet GetData(string ReportName)
{
DataSet ds = null;

if(ReportName == "Customers")
{
string sqlcommand = "SELECT * FROM Customers";

ds = SqlHelper.ExecuteDataset("Data
Source=(local);Database=Northwind;Trusted_Connecti on=true",CommandType.Text,sqlcommand);
}

return ds;
}
}
}

I also created a Dataset processing extension dll which name is
RSCustomData.dll

using System;
using System.Data;
using System.Collections;
using System.Xml;
using Microsoft.ReportingServices.DataProcessing;

namespace MyCompany.SqlReporting.DataExtension
{

public class CustomData :
Microsoft.ReportingServices.DataProcessing.IDataRe ader
{
private int _fieldCount = 0;
private int _currentRow = 0;
private string _fieldName;
private int _fieldOrdinal;
private Type _fieldType;
private object _fieldValue;
private DataSet _ds = null;

internal CustomData(string ReportName)
{
MyReports.myData mydata = new MyReports.myData();
_ds = mydata.GetData(ReportName);

_currentRow = -1;
}

public bool Read()
{
_currentRow++;
if(_currentRow >= _ds.Tables[0].Rows.Count){
return (false);
}
else
return (true);
}

public int FieldCount{
get{
_fieldCount = _ds.Tables[0].Columns.Count;
return _fieldCount;
}
}

public string GetName(int i)
{
_fieldName = _ds.Tables[0].Columns[i].ColumnName;
return _fieldName;
}

public Type GetFieldType(int i)
{
_fieldType = _ds.Tables[0].Columns[i].DataType;
return _fieldType;
}

public object GetValue(int i)
{
_fieldValue = _ds.Tables[0].Rows[this._currentRow][i];
return _fieldValue;
}

public int GetOrdinal(string name)
{
_fieldOrdinal = _ds.Tables[0].Columns[name].Ordinal;
return _fieldOrdinal;
}

public void Dispose()
{}
}
}

then I added these dll's to ReportServer bin file and ReportDesigner
and I added these tag to RSReportServer.config

in data tag

<Extension Name="MyDataExtension"
Type="MyCompany.SqlReporting.DataExtension,MyCompa ny.SqlReporting.DataExtensions"
/>

same tag to the RSDesigner.config file in the Data tag and designer
tag

Then I added this code policy tags to policy config files
When I try to add new report based on "MyDataExtension" on the report
wizard an error occured that is
"A connection cannot be made to the database. Set and check the
connection string." I am sure the connection string
is correct.

Where am i mistake ?
Nov 18 '05 #1
1 1877
Oney,

I am getting a similar error. How did you solve it?

regards,
Pereira
Mar 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Laub | last post by:
The following valid XSD schema can NOT be successfully read by the ReadXMLSchema method of the DataSet object - it errors out with a "NonEmptyString not defined" error. This schema is more complex...
5
by: Kieran Benton | last post by:
Hello, I'm currently in the tail end process of developing a high scalability server for my employer. Essentially it receives short socket based connections with an ASCII message, parses that...
3
by: JimGreen | last post by:
We are designing a WinForm application ( three tiered) There is a debate in our group as to whether we should pass datasets or our custom collections from business layer to the user interface...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
5
by: bryan | last post by:
If I understand correctly, I can write a custom handler for a given extension (say .abcd files) by writing a class that implements the IHttpHandler interface and then registering it in my web...
6
by: Steve Amey | last post by:
Hi all I want to be able to throw a custom error up the call stack. I have looked around and it seems as though it's possible, but I can't get it to work :o( Below is some sample code. ...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
1
by: Mutley | last post by:
Hi, I have written an HttpHandler to process page requests for a custom file extension. The handler gets called as expected and after searching the web for examples I have used a method called...
5
by: Simon Woods | last post by:
Hi Does anyone know if there any dotnet software out there which converts a dataset into a collection of custom objects, programmatically i.e. actually creates the class structure and collection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.