Click here to Skip to main content
14,331,044 members
   

C#

 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
OriginalGriff23-Aug-19 2:40
protectorOriginalGriff23-Aug-19 2:40 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
Richard MacCutchan23-Aug-19 3:27
protectorRichard MacCutchan23-Aug-19 3:27 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
OriginalGriff23-Aug-19 3:33
protectorOriginalGriff23-Aug-19 3:33 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
remiki23-Aug-19 11:44
memberremiki23-Aug-19 11:44 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
remiki23-Aug-19 1:53
memberremiki23-Aug-19 1:53 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
RobF_8323-Aug-19 11:33
memberRobF_8323-Aug-19 11:33 
GeneralRe: How to print crystal report directly to printer without previewing in c# Pin
remiki23-Aug-19 11:41
memberremiki23-Aug-19 11:41 
AnswerRe: How to print crystal report directly to printer without previewing in c# Pin
remiki25-Aug-19 22:42
memberremiki25-Aug-19 22:42 
Thank you verry much RobF_83
here is solution
void report()
       {
           cnx = new SqlConnection(db.RXcon);
          try
           {
               cnx.Open();
        string cg=" SELECT * from Consultation where NumFact=" + @Convert.ToInt32(textBox4.Text);
               commd2 = new SqlCommand(cg);
               commd2.Connection = cnx;
               DataSet dts = new DataSet();
               DataTable dt = new DataTable();
               dtr = commd2.ExecuteReader();
               dt.Load(dtr);
               FactCons c2 = new FactCons();
               c2.SetDataSource(dt);
               crystalReportViewer1.ReportSource = c2;
               c2.SetDatabaseLogon("sa", "765432");
               c2.PrintToPrinter(1, true,0, 0);// i just add this and it works correctly

           }
           catch (Exception ex)
           {
              MessageBox.Show(ex.Message);
           }
           cnx.Close();
       }

Questionhow can i make simple calendar using dropdownlist for year and months using c# window form let`s start learning c# Pin
Member 1448421922-Aug-19 16:10
memberMember 1448421922-Aug-19 16:10 
AnswerRe: how can i make simple calendar using dropdownlist for year and months using c# window form let`s start learning c# Pin
OriginalGriff22-Aug-19 19:47
protectorOriginalGriff22-Aug-19 19:47 
AnswerRe: how can i make simple calendar using dropdownlist for year and months using c# window form let`s start learning c# Pin
Richard MacCutchan22-Aug-19 21:43
protectorRichard MacCutchan22-Aug-19 21:43 
Generalc# Project Pin
arun exe21-Aug-19 15:36
professionalarun exe21-Aug-19 15:36 
AnswerRe: c# Project Pin
OriginalGriff21-Aug-19 19:48
protectorOriginalGriff21-Aug-19 19:48 
GeneralRe: c# Project Pin
arun exe21-Aug-19 20:24
professionalarun exe21-Aug-19 20:24 
QuestionExcel's MOD in C#? Pin
Jassim Rahma18-Aug-19 8:51
memberJassim Rahma18-Aug-19 8:51 
AnswerRe: Excel's MOD in C#? Pin
Pete O'Hanlon18-Aug-19 12:20
protectorPete O'Hanlon18-Aug-19 12:20 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 21:38
memberJassim Rahma18-Aug-19 21:38 
GeneralRe: Excel's MOD in C#? Pin
Peter_in_278018-Aug-19 21:58
professionalPeter_in_278018-Aug-19 21:58 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 22:18
memberJassim Rahma18-Aug-19 22:18 
GeneralRe: Excel's MOD in C#? Pin
Peter_in_278018-Aug-19 22:25
professionalPeter_in_278018-Aug-19 22:25 
AnswerRe: Excel's MOD in C#? Pin
OriginalGriff18-Aug-19 22:08
protectorOriginalGriff18-Aug-19 22:08 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 22:22
memberJassim Rahma18-Aug-19 22:22 
GeneralRe: Excel's MOD in C#? Pin
OriginalGriff18-Aug-19 22:28
protectorOriginalGriff18-Aug-19 22:28 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff19-Aug-19 21:48
mveBillWoodruff19-Aug-19 21:48 
AnswerRe: Excel's MOD in C#? Pin
BillWoodruff19-Aug-19 23:43
mveBillWoodruff19-Aug-19 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.