I have a table tbl_mdcl which show the sale details. I got the tbl_mdcl data using:

SELECT TOP 1000 [Invoice_No],[Invoice_Date],[CustomerId],[Med_Name],[Comp_Name],[Date_Manaf],[Date_Exp],[Qty],[Price],[Discount],[Retail]
  FROM [MMIS].[dbo].[tbl_mdcl] 

Following is the result of query:
http://i.imgur.com/51seVlK.jpg

To gather and report a monthly report using the above table ,i created a new CrsytalReportViewer and set its datasource to tbl_mdcl but it prints all its columns whereas i need something like this:

http://i.imgur.com/6lboLIP.jpg
How would i get it using CrystalReports.I already spent 7 hours solving this but in vain.

Now you are just directly taking ur records from the table. Instead what u want is to have your own query that will select only what you want. Use a DataAdapter to write and query and use a dataset to bind to crystal report. something like this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.