Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom Dataset Processing Extension Regisration

Reply
Thread Tools

Custom Dataset Processing Extension Regisration

 
 
Oney
Guest
Posts: n/a
 
      11-14-2004
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 ?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling a custom Ruby C extension method from other C extension IƱaki Baz Castillo Ruby 2 04-20-2011 12:24 PM
context.Response.Filter breaks processing of ISAPI Extension Dima67 ASP .Net 9 09-04-2009 12:26 PM
Post-Processing RAW vs Post-Processing TIFF Mike Henley Digital Photography 42 01-30-2005 08:26 AM
Question: processing HTML, re-write default processing action of many tags Hubert Hung-Hsien Chang Python 2 09-17-2004 03:10 PM
How to assign a custom principal with a custom soap extension Michael ASP .Net Web Services 3 05-12-2004 04:20 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57