By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,930 Members | 1,269 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

Runtime Crystal reports in VS.NET-C# (using CRAXDDRT20) problem

P: n/a
Hi all,

I'm trying create dynamic reports by Crystal Reports engine distributed with
VS.NET. I know there is only lite version without native support to do this,
but I've found another way via using CRAXDDRT20 library (Crystal Reports
..NET ActiveX Designer Design and Runtime library).

But I've problem with adding table by passing ADO recordset:

loCRGenerator = new CRAXDDRT20.ApplicationClass();
loReport = loCRGenerator.NewReport();

ADODB.RecordsetClass loADO = new ADODB.RecordsetClass();

foreach (DataColumn loColumn in aoDataGrid.CurrentDataTable.Columns)
{
loADO.Fields.Append(loColumn.ColumnName, ADODB.DataTypeEnum.adVarChar,
50, ADODB.FieldAttributeEnum.adFldMayBeNull);
}

loADO.Open(Missing.Value, Missing.Value, ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockBatchOptimistic, 0);
loReport.Database.Tables.Add("", Type.Missing, loADO, Type.Missing,
"p2smon.dll", Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing); <-- here raises error :-(

Error message says: "Type mismatch" ...

Please can You help me? Or exist another way how to do this there?

Thanks
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.