How export unformated value?
a TextObject, its Text is "[Substring([source.Mobile],0,3)+"****"]", I hope in the exporting file, this column show [source.Mobile] without modify, please help.
This discussion has been closed.
Comments
Hello!
In the designer, add the IsExport parameter (System.Boolean, default value false) and a BeforePrint handler for your TextObject (for example, TextMobile):
private void TextMobile_BeforePrint(object sender, EventArgs e) { bool isExport = (bool)Report.GetParameterValue(“IsExport”); string mobile = Convert.ToString(Report.GetColumnValue(“source.Mobile”)); if (isExport) { TextMobile.Text = mobile; } else { TextMobile.Text = (!string.IsNullOrEmpty(mobile) && mobile.Length >= 3) ? mobile.Substring(0, 3) + “****” : mobile; } }For programmatic export, set IsExport = true before calling Prepare():