I've started to use the CRAXDRT.Report within Visual Studio.NET C# environment. This is to allow me to have better control over what I can do with the Crystal Report within the code (add groups and the like).
I think I've been successful in this so far (after some initial hiccups). My code is as follows :
app1 = new CRAXDRT.Application();
testRpt = app1.OpenReport("C:\Report.rpt", 0);
testRpt.AddGroup(0, testRpt.Database.Tables[0].Fields[0], CRAXDRT.CRGroupCondition.crGCAnyValue, CRAXDRT.CRSortDirection.scAscendingOrder);
// And where my problem lies ...
crViewer1.ReportSource = testRpt;
(1). Does this code look OK so far ?
I'm assuming that this code has achieved the required results but cannot see the fruit of my labour.
When I try and preview the report through means of a CrystalReportViewer I get presented with an error :
'Invalid Report Source'
I can only assume that this is because I have moved away from the original use of the ReportDocument object.
(2). How can I get round this and make use of my CRAXDRT.Report in the Viewer component ?
Any advice / help would be appreciated.
Steve
I think I've been successful in this so far (after some initial hiccups). My code is as follows :
app1 = new CRAXDRT.Application();
testRpt = app1.OpenReport("C:\Report.rpt", 0);
testRpt.AddGroup(0, testRpt.Database.Tables[0].Fields[0], CRAXDRT.CRGroupCondition.crGCAnyValue, CRAXDRT.CRSortDirection.scAscendingOrder);
// And where my problem lies ...
crViewer1.ReportSource = testRpt;
(1). Does this code look OK so far ?
I'm assuming that this code has achieved the required results but cannot see the fruit of my labour.
When I try and preview the report through means of a CrystalReportViewer I get presented with an error :
'Invalid Report Source'
I can only assume that this is because I have moved away from the original use of the ReportDocument object.
(2). How can I get round this and make use of my CRAXDRT.Report in the Viewer component ?
Any advice / help would be appreciated.
Steve