Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Multi CrystalReports
Hello everyone!
I'm a newbie, I'm having a problem with Crystal Report in C# (VS2010)
In my Form, I have a Crystal Report file with many tables, but when connected, it requires password to view my report.
Please help me.
This is my code:
 
      SqlConnection cnn;
      string connectionString = null;
      string sql = null;
      connectionString = "connectring to sql server";
      cnn = new SqlConnection(connectionString);
      cnn.Open();
      sql = "SELECT multi table WHERE condition";
      SqlDataAdapter dscmd = new SqlDataAdapter(sql, cnn);
      DataSet ds = new DataSet();
      dscmd.Fill(ds, "Productandlist");
      objRpt.SetDataSource(ds.Tables[0]);
      crystalReportViewer1.ReportSource = objRpt;
      crystalReportViewer1.Refresh();
 
Please help me, sorry about my English
Posted 7-Mar-11 14:21pm
nht2007476
Edited 7-Mar-11 14:40pm
thatraja242.2K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here you go man....but here after please mention the error message properly in your question.
 
C# Crystal Reports Dynamic Logon parameters[^]
 
EDIT
--------------------------------------
 
C# Crystal Reports from multiple tables[^]
 
Also look at the other examples in C# Crystal Reports - Related Contents section in the same page.
  Permalink  
v2
Comments
nht2007 at 7-Mar-11 19:46pm
   
I tried this way but I want to insert a query to my report.
Please help me
thatraja at 7-Mar-11 19:49pm
   
Check my updated answer
nht2007 at 7-Mar-11 19:55pm
   
thank you so much for your help.
I'm using sql to connect report, my app connect through ip, it require password if i change ip.
and i tried to do in "http://csharp.net-informations.com/crystal-reports"
but all not working
thatraja at 7-Mar-11 20:11pm
   
Did you applied the code from the link
C# Crystal Reports Dynamic Logon parameters
? If you did then the the password box won't appear at run time.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

hi
we have same problem do have answer plz tell me
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

My data have 2 table. Can I use
objRpt.SetDataSource(ds);
ds contain 2 table i define
 
Thanks
  Permalink  

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

  Print Answers RSS
0 Maciej Los 310
1 OriginalGriff 285
2 Afzaal Ahmad Zeeshan 200
3 Sergey Alexandrovich Kryukov 195
4 BillWoodruff 180
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100