Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CRAXDRT.Report - problems

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
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
 
Hello.
I'm writing from Spain and I have exactly the same problem as yours. It's very important for me to know the solution, because I have to finish my "end-of-degree-proyect" and this is the last step.

I'd like to know if you already know the solution: so please, I beg your help.

Thank u

=)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top