I must have ABILITY TO LOGON TO 1 OF 9 similar DBs
so my users can have 1 report with DYNAMIC ACCESS TO ANY of the 9 DBs
so I have to pass the parameters into to the objReport
try
CrystalReport1 objReport = new CrystalReport1();
// database login ????
strDBLogon= "TRUX7_" + cboCompany.SelectedValue.ToString() + "_COMP";
dbSrvr ="DESQL1//TRUX7"; // reversed the backslash so it previews here better
objReport.SetDatabaseLogon("", "", dbSrvr, strDBLogon); // C1 is what is in cboCompany
crystalReportViewer1.ReportSource = objReport;
objReport.SetParameterValue("@BEGIN", (object)dateTimePicker1);
catch (Exception err)
err.Message --> " Value does not fall within the expected range."
Request clarification before answering.
DateTime datBegin = DateTime.Parse(dateTimePicker1.Value.ToString());
DateTime datEnd = DateTime.Parse(dateTimePicker2.Value.ToString());
objReport.SetParameterValue("@BEGIN", datBegin);//(object)
objReport.SetParameterValue("@END", datEnd); // dateTimePicker2 .Value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.