AyaNova service management & work order software
AyaNova Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Using a script to centre text Expand / Collapse
Author
Message
Posted 1/5/2008 10:31:41 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 5:59:47 PM
Posts: 84, Visits: 107
I have a report that has a label in it - The script to populate the label is:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrDispatchZone.Text = string.Format("{0}:  {1}.  {2}:  {3}",  ("Dispatch Zone"), DetailReport.GetCurrentColumnValue("LT_O_DispatchZone"), ("Client Group (Billing)"), DetailReport.GetCurrentColumnValue("LT_O_ClientGroup"));
}

The one issue that I have is that it is always left aligned even though the label is set to be centre aligned.  Is there any way within that script to add a command to centre the text?

Post #3654
Posted 1/5/2008 11:40:36 AM
AyaNova Sales & Support

AyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & Support

Group: Administrators
Last Login: Yesterday @ 6:40:13 PM
Posts: 1,687, Visits: 3,986
I'm not sure why your label is encountering that.

As I don't have a copy of your report template here, I tested this with the label in the Sample Detailed Service Workorder with Grand Total - the label that uses the script to combine city, state and postal code.

I edited the property TextAlignment to MiddleRight, and previewed, and it definitely does it.

I do not have information on how to use text alignment in a script - I would suggest performing a search online for C# text alignment, as it may show examples.

But I would suggest instead checking your label properties, as when I do it in a sample report template that is using a script to combine fields, the property TextAlignment works correctly.

- Joyce

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #3656
Posted 1/5/2008 12:04:10 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Yesterday @ 5:59:47 PM
Posts: 84, Visits: 107
Thank You - I took what you said and deleted the label, recreated from scratch and it worked fine?  Might be a remnant or corruption from the previous version of Ayanova?
Post #3657
« 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: AyaNova Sales & Support

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 10:34am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 12 queries. Compression Disabled.