How to PreZero a Check Number on a Supplier Check
Interprise Suite Community
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



How to PreZero a Check Number on a Supplier... Expand / Collapse
Message
Posted 4/23/2009 10:50:48 AM Post #65
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Get a reference to the label containing the field value, convert it to an integer, and replace the label text with the formatted number.
 
Put this in the OnBeforePrint script:
 
private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
   // Get typed reference to label
   DevExpress.XtraReports.UI.XRLabel checkNo = sender as DevExpress.XtraReports.UI.XRLabel;
 
   // If the check number isn't null or empty
   if (!string.IsNullOrEmpty(checkNo.Text))
   {
      // Convert to integer and format
      checkNo.Text = string.Format("{0:000000}", int.Parse(checkNo.Text));
   }

}


BJ Dimes
Software Development & Support Engineer
DimeSoft Business Solutions, Inc.
Interprise Suite Plugins
Interprise Suite Blog
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Bill Dimes, John Grande, BJ Dimes, Terry Palmer

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 12:27am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.016. 14 queries. Compression Disabled.
Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for our Email Newsletter

Links to our Sponsors

DimeSoft Business Solutions Logo Interprise Suite Plugins Logo Logo Ad

Recent DimeSoft Blog Posts

Recent InfoSourcing Blog Posts

Recent Premier Blog Posts