cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports ActiveX Designer Design and Runtime Library 11.5

Former Member
0 Kudos

Hai to all,

I'm new in crystal report 11.5, my task is desig time i just create a blank report during runtime programaticaly create Fieldobject,Blob object and so on, i came to know this is the right (Crystal Reports ActiveX Designer Design and Runtime Library 11.5) dll but, i dont know how to write the code. Experts please post simple code, i tried this site https://boc.sdn.sap.com/codesamples but there is no code related my task, experts please help me.

Softwares am using:

Visual studio 2005, asp.net 2.0, SQL server 2005 and crystal report 11.5

Edited by: winseelan j on Aug 21, 2008 4:03 PM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello,

There is another post in this forum that has just resolved the same issue.

The code he used will probably be what you are looking for.

[Click Here|;

Elaine

Former Member
0 Kudos

Hi Elaine,

That link has very useful code, but they are using

Crystal Report 2008 but i'm using only Crystal Report 11.5, are both same ? because when gothrough his code some of the properties are not found in my machine such as var,

table.Name = tabelName;

table.Alias = tabelName;

table.QualifiedName = tabelName;

table.Description = tabelName;

the Name,Alias,QualifiedName are not found?

then how can i use that code?

Former Member
0 Kudos

Hai Elaine Dove,

I tried what you gave the link on your previous

post, but they did it by Crystal Report 2008, but i'm using

Crystal Report 11.5, can you give any other solution?

Could you please give me any solution/source code,

please nearly past 3 weeks i try find the solution, please help me.

Thanks in advance

Former Member
0 Kudos

Hello,

The references will be different in your application since you are using Crystal Reports XI R2 but the code should be the same. You need to use In-Proc RAS since you do not have Crystal Reports Server or Business Objects Enterprise installed.

// Create a RAS Document through In-Proc RAS through the RPTDoc.

_ClientDoc = _ReportDoc.ReportClientDocument;

That is exactly what you need to do what you want to do.

Elaine

Former Member
0 Kudos

Hello,

You are welcome!

Yes, you can use RAS with Visual Studio .NET 2005 and an ASP.NET application.

Elaine

Former Member
0 Kudos

Elaine Dove ,

Thanks for your response. One more question i have, if i develop the application with RAS, then i install MyProject in the production server then, is any need the server also have RAS or with my project i just include the RAS references?

Former Member
0 Kudos

Hai Elaine Dove,

Really appriciate your response.

I walkthrough the entire links and download the

sample code files but there is no source like my expectation.

Actualy now i know the basic operation of crystal report

.That is how to use XML / XSD file and how to design the

report at design time and how to bind it & display in the

report viewer control. But still i'm not get how to add

table,fieldobject,blobobjects to crystal reports at runtime

programaticaly. Could you please help me how to solve this

problem?

Former Member
0 Kudos

Hello,

You are using the wrong SDK in this case. You cannot use ADO.NET (crdb_adoplus.dll) with the RDC. It would not recognise it. RDC only supports classic ADO (crdb_oledb.dll). Report Creation APi and the RDC was designed for Visual Basic 6.0.

To do what you are trying to do you would have to use the Report Application Server (RAS) in .NET to create your reports.

I recommend starting by creating a simple application with the report created in the Crystal Report designer using ADO.NET(XML) driver and Visual Studio .NET code to pass the dataset at runtime so you are familiar with the code and properties before trying to create the full report in code with RAS.

You will find more information and samples in the Developer's Library:

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm

The samples are at:

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/CrystalReports_dotNET_SDK/sampleL...

Look for "VB_Web_Data_DataSets".

If you create a dataset you want in Visual Studio .NET, you can write it to XML or and XML Schema and use that to create the report.

'From a dataset, create an XML file to use creating a new report

'using the full path to the .xml file, include the schema

dataSet.WriteXml("C:\Temp\myReportData.xml", XmlWriteMode.WriteSchema)

'Or create a schema to use building a report

dataSet.WriteXmlSchema("C:\Temp\myReportData.xsd")

Once you have the report format the way you want it, you can use the Report Application Server Samples from the Developer's Help to give you direction in building your report at runtime:

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/RAS_SDK/sampleList.htm

Elaine

Former Member
0 Kudos

Hai Elaine Dove,

Really thanks for your response. Before start to study Report application server i have one questsion

Can we use Report Application Server in Visual Studio2005 and Asp.Net2.0?

Former Member
0 Kudos

Hello,

What database driver are you using? Crystal reports reads the database driver for the specific properties of the driver starting with Crystal Reports 9.0.

What you pass in the following line would depend on the driver used:

crDBTables.Add(sDatabasePath, null, null, null, null, "D3326", null, "xtreme", "", "");

Elaine

Former Member
0 Kudos

Hai thanks for your response, actualy i want to use ado.net for this dynamic binding purpose, then could you tell me how to use ado.net and cr11.5.?

Former Member
0 Kudos

Hello,

Crystal Reports ActiveX Designer Design and Runtime Library 11.5 is the ReportCreation API for Visual Basic 6.0. It is not supported in Visual Studio .NET. There are some older How To articles that are still valid. Search on "How to" Report Creation API". Licensing is no longer required."

[Click Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] [Click Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]

You can do report creation in Visual Studio .NET using the Report Application Server (RAS).

[Click Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]

You can find .NET RAS samples at:

https://boc.sdn.sap.com/codesamples

Search for "Report Creation API"

Elaine

Former Member
0 Kudos

Hi Elaine Dove,

Thanks for your response, i saw first and second link both are using CR 8 version and i saw lot of samples in your last link but there is no source which is like my tak. Can you pelase tell me, which COM or dll i need to add and how write the code?

Former Member
0 Kudos

Hai as per your advice i add the following code

public void AddDatabase()

{

try

{

//Variables used to setup the Database connection

CRAXDRT.DatabaseTables crDBTables;

string sDatabasePath;

string sTableName;

//Get the Tables collection because it has the Add() method needed

//to add a connection to the report

crDBTables = crReport.Database.Tables;

//Set the values for the connection variables

//The full path and name of the Access database.

//The database resides in the same directory as the application

sDatabasePath = Server.MapPath(".") + "
xtreme.mdb";

//The name of the Access table

sTableName = "Customer";

//Use the .Add() method to add the database table to the report.

//There are several optional arguments for the Add method. Which arguments are passed

//will depend on the type of database, the type of table and the type of connection.

//Add the 'Customer' table

crDBTables.Add(sDatabasePath, null, null, null, null, "D3326", null, "xtreme", "", "");

}

catch (Exception ex)

{

throw ex;

}

}

but when the control is reached the Bolded line then it'll throw an error as

Object reference not set to an instance of an object.

and i trace it, it like this

Stack trace: at CRAXDRT.ReportClass.get_Database()

at DynamicBinding._Default.AddDatabase() in D:\DotNetPracticals2005\CR 11.5\DynamicBinding

Could you please tell me how to solve this error?