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



if "combined" field shows no data in v3.3.3.0... Expand / Collapse
Author
Message
Posted 1/10/2007 5:01:29 PM
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 @ 4:59:45 PM
Posts: 1,868, Visits: 4,328
A previous sample report template showed how to create a script to "Combine" data fields so that they showed in one field. The latest version of AyaNova v3.3.3.0 uses the latest printing engine component now requires that the script include identification of the band where the datafields are from - so your report template may need to be edited.

For example:

The Sample Detailed Report Template has the city, state and postal code combined to display in one field so that regardless on the length of a city name, the space between city, state and postal is always even.

But in some instances you may find that nothing shows - even though you have checked that the client actually does have a physcial address entered in the client entry screen.

The reason may be due to the script used to display this "combined" city, state and address field is not identifying the band where the field is - resulting in a miscommunication of where to get the data from.

1. Open up the report template in the report designer

2. Click on the field that is using the combined script - in the screen shot example below, this field actually has the property Text set to "combined address field" and is label xrLabel11

3. Now expand the property Scripts

4. Click on the OnBeforePrint property to open the Script Editor for the OnBeforePrint script

5. Take a look - is the band name stated before every instance of GetCurrentColumnValue?

For example, in the screen shot below, the field xrLabel11 is located in the DetailReport band - therefore in the script text, DetailReport. must be identfied before the GetCurrentColumnValue, so your script would look like this:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrLabel11.Text = string.Format("{0} , {1}  {2}", DetailReport.GetCurrentColumnValue("LT_Address_Label_City"), DetailReport.GetCurrentColumnValue("LT_Address_Label_StateProv"), DetailReport.GetCurrentColumnValue("LT_Address_Label_Postal"));
}



AyaNova Sales & Technical Support
http://www.ayanova.com
Post #2578
« 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 6:56am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 17 queries. Compression Disabled.