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



Work Order Report Problems Expand / Collapse
Author
Message
Posted 7/24/2007 4:52:50 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 6/18/2008 10:55:58 AM
Posts: 28, Visits: 85
Hello,

First, please keep in mind I am completely new to this.  I am trying to create / modify my own detailed workorder report (I have attached it).  Where my first problem is; I am trying to add labor lines.  I ca do this, however, it displays only the first line repeatedly, no matter how many lines are in the work order.  Make sense?  I have read the sample detailed workorder tutorial - AND I AM MISSING SOMETHING!  Please help me!

Many thanks!

Joshua Bachman
ISUS Technology Services

  Post Attachments 
Service Order.zip (3 views, 33.08 KB)

Post #3295
Posted 7/24/2007 5:39:19 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: Today @ 7:45:59 AM
Posts: 1,865, Visits: 4,324
Hi Joshua

Thank you for attaching a copy of the report template - that allows me to see right away what is happening so that I can post a sugestion/solution for you right away too.

You have done a really nice job of this report template, but it is not that you are missing something, it is that you have bound the fields in your report designer panel to the incorrect dataset in a "Detailed" work order report template Fields list

I'm not sure if you were originally referring to the "Tutorial on making a detailed workorder report" from http://forum.ayanova.com/Topic1298-103-1.aspx (if not, go to that link and download the tutorial and refer to it along with my next info)

Go to Step #37 in this tutorial - from here forward it refers to ensuring that you select from the topmost dataset and its own sub-datasets WorkrderHeader only. Ignore the other datasets listed underneath that are labeled "WorkorderItem", "WorkorderItemLabor" etc - because of the way the report designer works, we have to have those there, but if you select datafields from them as youhave done, your report will perform as yours is.

Here is an example of what you need to edit on every datafield in the design panel in the workorder item band Detail and the labor band Detail1

 

 

 

 



AyaNova Sales & Technical Support
http://www.ayanova.com
Post #3296
Posted 7/26/2007 4:50:42 PM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 6/18/2008 10:55:58 AM
Posts: 28, Visits: 85
OK!

I see!  Thank you very much.  Works great.  Now for my next question.  I am trying display and calculate the parts, labor and sales tax in the Report Footer.  I looked at the sample and I cannot get it to work.. Any suggestions?

Thank you

Joshua Bachman
ISUS Technology Services

Post #3300
Posted 7/26/2007 5:28:47 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: Today @ 7:45:59 AM
Posts: 1,865, Visits: 4,324
Hi again Joshua

Great to hear above helped.

Not sure what to suggest as not sure what it is that you are having a problem with specifically. I would recommend re-looking at the sample report template working backwards from the script of the datafield that displays the final amount up through the scripts of the other fields that accumlate the tax total for that last datafield.

- Joyce

AyaNova Sales & Technical Support
http://www.ayanova.com
Post #3301
Posted 7/27/2007 8:37:04 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: Today @ 7:45:59 AM
Posts: 1,865, Visits: 4,324
Hi again Joshua

If you are referring to the Sample Detailed Workorder with Grand Total for example the field xrNetTaxA field in the ReportFooter1 band, if you expand the Scripts property for this field, you will see that it has a OnBeforePrint script of

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrNetTaxA.Text = string.Format("{0:c2}", NetTaxA);
}

What that script is doing is taking the accumulated amount in the NetTaxA and formatting it to display as a string and placing it in the xrNetTaxA field as text

If you work your way up the design panel in each of the groupfooter bands, for example, click on the xrTableCell118 in GroupFooter5 in the DetailReportItemLoan band which is for the Tax A sum for all loan items, open its Scripts properties, you will see that it has a script in the OnSummaryCalculated of

private void OnSummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
{
if(e.Value != null)
  NetTaxA += Convert.ToDecimal(e.Value);
}

And if you go to the next band above that, in the GroupFooter4 of the Misc Expense band, the field xrTableCell100 which is for the Tax A sum for all misc expenses, open its Scripts properties, you will see here too that it has a script in the OnSummaryCalculated of

private void OnSummaryCalculated(object sender, DevExpress.XtraReports.UI.TextFormatEventArgs e)
{
if(e.Value != null)
  NetTaxA += Convert.ToDecimal(e.Value);
}

Continue checking each of the fields in teh design panel in the groupfooters, and you will see each of those for Tax A has a script that keeps a running total of all Tax A so that it accumulates to place the total tax A into that xrNetTaxA field in the ReportFooter1

That is how the total tax A is accumulated to show in that field in the report footer.

Also note that in the Scripts property of the ReportHeader band, that NetTaxA is declared and what its initial value is so that each workorder report is zero'd out before hand

decimal NetLabor = 0;
decimal NetTravel = 0;
decimal NetPart = 0;
decimal NetMiscExpense = 0;
decimal NetLoan = 0;
decimal NetTaxA = 0;
decimal NetTaxB = 0;
decimal GrandTotal = 0;

I do encourage you to refer to the sample report templates, and work your way backwards from the field that you want to do similar to, so that you can see how we have done the sample. If you have additional questions, do always provide specifics so that I can help.

- Joyce

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

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 11 queries. Compression Disabled.