Click here to Skip to main content
15,888,037 members
Home / Discussions / C#
   

C#

 
AnswerRe: PictureBox Pin
Anudeep Jaiswal - MCA7-Sep-10 7:10
Anudeep Jaiswal - MCA7-Sep-10 7:10 
QuestionApache & C# Web Pages Pin
StrayGrey5-Oct-05 3:24
StrayGrey5-Oct-05 3:24 
AnswerRe: Apache & C# Web Pages Pin
enjoycrack5-Oct-05 14:28
enjoycrack5-Oct-05 14:28 
QuestionApache & C# Web Pages Pin
StrayGrey5-Oct-05 3:19
StrayGrey5-Oct-05 3:19 
AnswerRe: Apache & C# Web Pages Pin
Daniel Turini5-Oct-05 3:39
Daniel Turini5-Oct-05 3:39 
QuestionHow do I delay Windows shutdown with a Console Project in .NET? Pin
DavidWGriffin5-Oct-05 3:05
DavidWGriffin5-Oct-05 3:05 
AnswerRe: How do I delay Windows shutdown with a Console Project in .NET? Pin
DavidWGriffin5-Oct-05 12:05
DavidWGriffin5-Oct-05 12:05 
QuestionCrystal Reports with Multiple Values Pin
dbetting5-Oct-05 2:45
dbetting5-Oct-05 2:45 
I've been trying to find a solution to this problem. Searching here, Business Objects and several other sites, I'm finding many requests outlining the same problem but in none have I found an answer to it.

Given the programatic declaration of a Crystal Report as defined below, it works great in all reports except when I need to use a variable that has to accept multiple values such as prmStatusCodes. With this parameter, the user identifies with check boxes the status' of orders they wish to view.

rptCustomerSummary newRpt = new rptCustomerSummary();
CrystalDecisions.CrystalReports.Engine.ReportDocument rptDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rptDocument.Load(ReportsPath+"rptCustomerSummary.rpt");
crViewer.ShowGotoPageButton = true;
crViewer.ShowPageNavigateButtons = true;

CrystalDecisions.Shared.TableLogOnInfo rptLogin = new CrystalDecisions.Shared.TableLogOnInfo();
foreach (CrystalDecisions.CrystalReports.Engine.Table tbl in newRpt.Database.Tables)
{
  rptLogin = tbl.LogOnInfo;
  rptLogin.ConnectionInfo.ServerName = dbServer;
  rptLogin.ConnectionInfo.UserID     = dbReportLoginName;
  rptLogin.ConnectionInfo.Password   = dbReportLoginPwd;
  tbl.ApplyLogOnInfo(rptLogin);
}

/* Customer Id Parameter */
currParamValue = new ParameterValues();
paramValue = new ParameterDiscreteValue();
paramValue.Value = CompanyId.ToString();
currParamValue.Add(paramValue);
paramFieldDefs = newRpt.DataDefinition.ParameterFields;
paramFieldDef = paramFieldDefs["prmCustomerId"];
paramFieldDef.ApplyCurrentValues(currParamValue);

/* Selected Status Options */
currParamValue = new ParameterValues();
paramValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
foreach (int i in ReportOptionIntAry)
{
  paramValue.Value = ReportOptionIntAry[i].ToString();
  currParamValue.Add(paramValue);
}
paramFieldDefs = newRpt.DataDefinition.ParameterFields;
paramFieldDef = paramFieldDefs["prmStatusCodes"];
paramFieldDef.ApplyCurrentValues(currParamValue);

crViewer.ReportSource = newRpt;

In Crystal Reports, I've defined the parameter prmStatusCodes as a Discrete of type Number and Allow Multiple Values. In the report Select Expert I have

RPT_CUSTOMER_SUMMARY_V.CUSTOMER_ID} = {?prmCustomerId} and
{RPT_CUSTOMER_SUMMARY_V.STATUS_ID} in {?prmStatusCodes}

In the report, if I change {?prmStatusCodes} to [5, 7, 9, 24] as if the user selected those four statuses, it gives the expected results. If I use the parameter and pass in a set of statuses, only those orders that are the status of the first parameter display. It does matter what parameters are passed in, only the first parameter is recognized.

Can someone point out the error of ways?
QuestionHow to populate bool array with all true values Pin
jills5-Oct-05 2:39
jills5-Oct-05 2:39 
AnswerRe: How to populate bool array with all true values Pin
Stefan Troschuetz5-Oct-05 4:17
Stefan Troschuetz5-Oct-05 4:17 
GeneralRe: How to populate bool array with all true values Pin
jills5-Oct-05 19:38
jills5-Oct-05 19:38 
GeneralRe: How to populate bool array with all true values Pin
Stefan Troschuetz8-Oct-05 1:42
Stefan Troschuetz8-Oct-05 1:42 
Questionremote information processing Pin
andre.pietsch5-Oct-05 1:46
andre.pietsch5-Oct-05 1:46 
QuestionImage Rotation Pin
PHDENG815-Oct-05 1:39
PHDENG815-Oct-05 1:39 
Questionmove form without title bar Pin
Rizwan Bashir4-Oct-05 23:59
Rizwan Bashir4-Oct-05 23:59 
AnswerRe: move form without title bar Pin
PHDENG815-Oct-05 1:31
PHDENG815-Oct-05 1:31 
Questionjoining excel sheet to c#(Ado.net) but giving error Pin
Member 23064614-Oct-05 23:23
Member 23064614-Oct-05 23:23 
QuestionHow To Convert IHTMLElement to IHTMLElementRender Pin
prochf4-Oct-05 22:04
prochf4-Oct-05 22:04 
QuestionNeed a recursive logic Pin
Chetan Ranpariya4-Oct-05 21:34
Chetan Ranpariya4-Oct-05 21:34 
QuestionProcess terminating event Pin
Prashant Gadhave4-Oct-05 21:31
Prashant Gadhave4-Oct-05 21:31 
AnswerRe: Process terminating event Pin
Stefan Troschuetz4-Oct-05 21:55
Stefan Troschuetz4-Oct-05 21:55 
QuestionAsynchronous Callback Pin
Member 22045224-Oct-05 20:53
Member 22045224-Oct-05 20:53 
AnswerRe: Asynchronous Callback Pin
Stefan Troschuetz4-Oct-05 22:14
Stefan Troschuetz4-Oct-05 22:14 
AnswerRe: Asynchronous Callback Pin
S. Senthil Kumar5-Oct-05 1:25
S. Senthil Kumar5-Oct-05 1:25 
QuestionSome problem regarding access permission Pin
akshayswaroop4-Oct-05 19:32
akshayswaroop4-Oct-05 19:32 

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.