473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Unable to use crystalreport OCX control in C# Win App

I had added crytal32.ocx control, but it showing an error

System.Runtime.InteropServices.COMException was unhandled
Message="Exception from HRESULT: 0x800A501B"
Source="Interop.Crystal"
ErrorCode=-2146807781

Expand|Select|Wrap|Line Numbers
  1. //code sniffet--
  2. IDataReader IDR;
  3. SqlConnection CN = new SqlConnection("Data source= BJ-PC\\SQlEXPRESS;User ID= sa; Password=sa1; Initial Catalog=Bakery");
  4. CN.Open();
  5. SqlCommand Cmd = new SqlCommand("Select * from Tax", CN);
  6. IDR = Cmd.ExecuteReader();
  7. crpt.Reset();
  8. crpt.DiscardSavedData = true;
  9. crpt.ReportFileName = "D:\\DSA\\Reports\\Audit.rpt";
  10. crpt.SetTablePrivateData(0,3, IDR);
  11.  crpt.Action = 1;
  12.  
Help me out

Thanks
BJ
May 18 '12 #1
0 1548

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Boris F | last post by:
Problem in DotNet 2003. I have CrystalReport Class in my project. When I'm trying to create instance of ReportDocument control on my form in IDE dialog box comes up with multiple choise of...
0
by: s-galit | last post by:
hi, i have a formula parameter in my crystalReport how can i initalize the parameter so that in every line in the crystalReport the parameter will have a different string? how to get to line in...
3
by: redneon | last post by:
I've populated a DataSet in my C# program and verified that it contains the data I passed it. I've then created a blank CrystalReport and set it's DataSource to my DataSet. Then I created a...
1
by: Jason Huang | last post by:
Hi, In the VB6, they have a CrystalReport Control, do we have a CrystalReport for the C#.Net? Thanks for help. Jason
2
by: Don Wash | last post by:
Hi All! I've been searching everywhere for a simple sample of producing a bar graph using CrystalReport by specifying SQL Query, and I've found none of it! I find so many complex samples with so...
2
by: Wilfried Mestdagh | last post by:
Hi, I need to do reporting. As far as I can see to get crystalreport to work you need to go to some wizards and then it is connected to a database. that is not what I want. Seems a double...
0
by: agcabutotan | last post by:
Hi to everyone. I am new in this thread, please help me. I'm having difficulty with CrystalReport.Net. I have a completed project written and compiled in VB.Net (and I used CrystalReport.Net in...
1
by: mhsasono | last post by:
Hi all, Has anybody experienced with CrystalReport? My question is: Does CrystalReport have capability to print the Microsoft Word document? Reason: I want to know CrystalReport capability...
2
by: nmsreddi | last post by:
Hello friends i am using Asp.net2.0 and c# ,i am placing a crystalreport viewer on the webform , and also i want to place a calender on that form which is required for passing dates to the report...
2
by: eshwaramoorthy | last post by:
Hi Guys, I like to know whts the relation between activex control and crystal report10 in asp.net with respect to viewing reports. thanks in advance
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.