Click here to Skip to main content
15,879,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am new in Crystal Report, I've Created a Crystal Report Successfully By following Methods

1)Created Crystal Report As Blank
2)get into Database Expert and create Database using OLE DB(ADO)
3)in OLE DB(ADO) i simply add tables into the Database and showed it on Crystal Report
4)Then i created a Win form on which i used Crystal Report Viewer
5)then i use following Code on Crystal Report Viewer Tab to Call the Crystal Report

Code:

C#
var cryRpt = new ReportDocument();
cryRpt.Load(@"C:\Users\Ahsan\Desktop\PROJECT INVENTORY SOFTWARE\InventorySoftware\InventorySoftware\Crystal Reports\CrystalReport2.rpt");
crystalReportViewer1.ReportSource = cryRpt;
crystalReportViewer1.Refresh();


Now what does it do, it go to table fetch complete Data on the table, like if i have 500 Records then it will load all the 500 Records, and that's what i don't want to do. what i actually need to do is to fetch data of a specific invoice no and i am not able to do this in any way.

i want it to fetch data for only that invoice number which is written on the form (a text box) at run time, and the query through which i want to fetch data is build using Joins.

i am stuck and doing Google from past 3 hours but not able to do it.

Please dear fellows Help me out. i will be very grateful

Thanks.
Posted
Updated 25-May-14 0:19am
v3

1 solution

use limit sql keyword in your query or add where condtion
 
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