Code Code C# |
Hi, i have included all my question under comments, they are few issues related to crystal reports, use of paramters!
TY
Code Code C# |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Roei BarRank #1,271 · 1.4K reputationPosted Oct 18, 2009, 10:46 PM EDT
//could "customerName" field parameter hold more than one value? //Yes it can paraVals = paraFieldDefinition.CurrentValues; //why we clear this? this will clear off the values that was assigned from the //previouse line. // it is wise to clear the parameters unless you use the using scope, this is because there is a known //bug that the GC doesnt necessarily clear all objects in the ParameterValues Object paraVals.Clear(); //add the parameter values to the collection paraVals.Add(paraDiscreatValue); //what happense here? paraFieldDefinition.ApplyCurrentValues(paraVals);Nilanka DharmadasaRank #1,875 · 794 reputationPosted Oct 18, 2009, 11:01 PM EDT
ParameterValues paraVals = new ParameterValues();
ParameterDiscreteValue paraDiscreatValue = new ParameterDiscreteValue();
paraDiscreatValue.Value = tbxCustomerName.Text;
paraVals.Add(paraDiscreatValue);
ParameterFieldDefinition paraFieldDefinition = paraFieldDefinitions["customerName"];
parameterFieldDefinition.ApplyCurrentValues(paraVals);
This code will help you. You don't have to clear off the values. Use this.