Dynamically change the Crystal report
-
Can any one help, I am developing the crystal report(salary report) for emp salary details application using c# .net 2.0 version window application. In "salary report" have following field object and text objects are there. field objects ************ 1)modeofpayment1 2)VoucherNumber1 3)AccountNumber1 4)ChequeNumber1 5)BankName1 text objects ********** 1)txtmodeofpayment 2)txtVoucherNumber 3)txtAccountNumber 4)txtChequeNumber 5)txtBankName Requirement *********** If modeofpayment1 field object value is "Cash" then 1)txtAccountNumber 2)txtChequeNumber 3)txtBankName text objects is invisible. If modeofpayment1 field object value is "BankDeposit" then 1)txtVoucherNumber text object is invisible. I have tried following code
CrystalDecisions.CrystalReports.Engine.TextObject temp = ((CrystalDecisions.CrystalReports.Engine.TextObject)cr1.ReportDefinition.Sections["Section3"].ReportObjects["txtAccountNumber"]);
temp.Text = "";the above code is ok for only one record. How to do for multiple record. Thanks, Bruze.