Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi sir,

i want to load Crystal report page dynamically.
currently i am loading this way:..

C#
reportdocument.Load("E:\\Development\\Rajesh\\Billing Inventory\\New folder\\Billing_Inventory\\Billing_Inventory\\ReportJobwork.rpt");


I am using Window Forms.

please help me..
thanking You!
Posted
Comments
V. 21-Mar-12 3:21am    
What do you mean by dynamically? You can load an existing report and pass parameters to it or you can create rpt files 'on the fly' by passing DataSources and define your report through code.

I recommend the first approach.
rajesh@1989 21-Mar-12 3:41am    
In Load argument I am passing crystal report path.
when i create an exe of that Software then error has occured like this:

unhalded exception has occured in you application.Load report failed. System can not find specified path.

I am also used rpt.Load(@"..\..\..\Billing_Inventory\ReportJobwork.rpt");

1 solution

In your solution add a folder caled Reports and in reports folder add a report use following code
VB
lPath = lDir.Parent.FullName.ToString() & "\Reports\CrystalReport.rpt"
lReport.Load(lPath)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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