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



Combined Address Expand / Collapse
Author
Message
Posted 10/9/2009 12:14:04 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/11/2009 3:46:53 PM
Posts: 13, Visits: 28
I have reviewed other postings in the forum regarding combing the city,state,zip in one line. I copied the script form the sample detailed workorder, and made sure that that I changed the label number to match the label the script is in. I also made sure that it is in the same band. Here is what I have:

{
xrLabel12.Text = string.Format("{0} , {1} {2}", DetailReport.GetCurrentColumnValue("LT_Address_Label_City"), DetailReport.GetCurrentColumnValue("LT_Address_Label_StateProv"), DetailReport.GetCurrentColumnValue("LT_Address_Label_Postal"));
}

From what I can tell, I have this script in the correct location, before print.

I am still gettnig the following error:

Error CS0103: The name "xrlabel12" does not exist in the current context.

Template attached.

Thanks!

  Post Attachments 
Ayanova Test Quote - Rev 3.zip (2 views, 4.65 KB)
Post #4859
Posted 10/9/2009 12:48:16 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: 2 days ago @ 7:34:22 AM
Posts: 2,190, Visits: 5,029
Hi again Mike

The error message is telling you that there is no such thing as a control called xrlabel12 as you have in your script

If you click on that field in your report template where you are using this script, what is its (Name) property?

The report template you attached when I click on that control field shows that field as called label12 , not xrLabel12, so you would need to edit your script so that it is calling that control field label12 

Note that case is sensitive as well as the exact spelling, so you can not call Label12 (with a capital L) neither - it must be the exact name of that control as per its property.

Your script should be :

label12.Text = string.Format("{0} , {1} {2}", DetailReport.GetCurrentColumnValue("LT_Address_Label_City"), DetailReport.GetCurrentColumnValue("LT_Address_Label_StateProv"), DetailReport.GetCurrentColumnValue("LT_Address_Label_Postal"));

And then it will work.

Just in case this comes up if a combined script is used elsewhere on the report template, you do have the correct name of the band being referred to (DetailReport) so that too is also correct, but if the control field was in a detail band for another dataset, you would need to edit the script so that you are getting the current column value from the dataset it is from. For example, if the control field was actually in the detail band of the DetailReportItem, your script would instead have ... DetailReportItem.GetCurrentColumnValue("LT_Address_Label_City"),  ....etc)

Do note that due to the holiday, support is now closed for the weekend, returning Tuesday as per http://forum.ayanova.com/Topic4830-62-1.aspx

- Joyce

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #4860
Posted 10/9/2009 1:15:23 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 11/11/2009 3:46:53 PM
Posts: 13, Visits: 28
Thank you and have a nice weekend.
Post #4862
« 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 9:52pm

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.047. 14 queries. Compression Disabled.