Click here to Skip to main content
15,896,478 members

ActiveReport_ReportStart bind subreport script

kubi081 asked:

Open original thread
I'm using Active Reports Subreport tool, I want to bind data source in ActiveReport_ReportStart as script by connecting Oracle. I'm using the script below but I'm having this error: Error Message:[DBNETLIB][Connection Open (Connect()).]SQL Server does not exist or access denied. Invalid connection string attribute.

C#
public void ActiveReport_ReportStart()
{
string connString = "Provider=SQLOleDB;User Id=XXX;Password=XX;Server=XXX;Service      Name=XX;Direct=True;Persist Security Info=True";
string sqlString = @"sql query";
DataDynamics.ActiveReports.DataSources.OleDBDataSource ds = new     DataDynamics.ActiveReports.DataSources.OleDBDataSource();
ds.ConnectionString = connString;
ds.SQL = sqlString;
rpt.DataSource = ds;
}


it is actually oracle connection, so ı changed the connection string to :
Devart.Data.Oracle.OracleConnection con = new Devart.Data.Oracle.OracleConnection(); con.ConnectionString = "POOLING=FALSE;User Id=XX;Password=XX;Server=XX;Direct=True;Sid=XX;Persist Security Info=True";
DataTable dt = new DataTable();
Devart.Data.Oracle.OracleDataAdapter da = new Devart.Data.Oracle.OracleDataAdapter(sqlString, con);
da.Fill(dt);
sbrpt.DataSource = dt;

But this time I'm having "Type or namespace Devart could not be found!"

I have tried ;
arDesigner.Report.AddScriptReference("Devart.Data.Oracle.dll");
but it does not work!

Thanks in advance...
Tags: Reporting

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900