Adding columns to a report...
I am trying to make a change to the Expense Tracker app in marketplace. I have added it to my account and allowed access to support.
There is a section called Expense Pie Chart that i want to make a change to.
The application shows a table and a pie chart showing all expenses for a selected time period.
I want to add more columns to the table.
I was able to add the header rows to the table but cannot get any data to work. I get an error when i save the script.
<tr class="zc-row-header">
<td class="zc-viewrowheader">Date</td>
<td class="zc-viewrowheader">Category</td>
<td class="zc-viewrowheader">Sub Category</td>
<td class="zc-viewrowheader">Description</td>
<td class="zc-viewrowheader">Agent Name</td>
<td class="zc-viewrowheader">Cheque #</td>
<td class="zc-viewrowheader">Actual</td>
<td class="zc-viewrowheader">Additional Information</td>
As for he actual date, the original script shows the code as seen in the inserted script. I have changed
<td><%=r.Enter_New_Expense_Category%></td>
<td><%=totact%></td>
TO
<td><%=r.Expense_Date%></td>
<td><%=r.Enter_New_Expense_Categor%></td>
<td><%=r.Sub_Category%></td>
<td><%=r.Description%></td>
<td><%=r.Agent_Name%></td>
<td><%=r.Payment_method%></td>
<td><%=r.Cheque%></td>
<td><%=totact%></td>
<td><%=r.Aditional_Information%></td>
BUT i am getting the following error message:
Error at line:11
Field Expense_Date does not exist in the form add_new_item
What do I have to do to show the data for these other fields?
If you could just edit the program directly that may save everyone some time. Otherwise please let me know.
Thanks!
- htmlpage Expense_Pie_Chart(Month, Year)
displayname = "Expense Pie Chart"
content
<%{%>
<div elName='zc-component' formLinkName='Monthly_Report_Pie_Chart' params='zcSuccMsg=Thank You'>Loading Form</div> <br><¬tualExpense = map();
if ((input.Month != null) && (input.Year != null))
{
cat = add_new_item [ID != 0];%>
<table zc-viewtable width="50%" cellspacing="1" cellpadding="1" border="0">
<caption class="zc-viewtitle">Expense Report</caption>
<tbody>
<tr class="zc-row-header">
<td class="zc-viewrowheader">Date</td>
<td class="zc-viewrowheader">Category</td>
<td class="zc-viewrowheader">Sub Category</td>
<td class="zc-viewrowheader">Description</td>
<td class="zc-viewrowheader">Agent Name</td>
<td class="zc-viewrowheader">Cheque #</td>
<td class="zc-viewrowheader">Actual</td>
<td class="zc-viewrowheader">Additional Information</td>
</tr><%for each r in cat
{
totact = 0.0;
act = add_new_expense1 [((Category == r.Enter_New_Expense_Category && Formula_1 == input.Month) && Formula_2 == input.Year)];
if (count(add_new_expense1[((Category == r.Enter_New_Expense_Category && Formula_1 == input.Month) && Formula_2 == input.Year)]) != 0)
{
for each r1 in act
{
totact = (totact + r1.Amount);
}
actualExpense.put(r.Enter_New_Expense_Category, totact + "");%>
<tr class="zc-viewrow zc-grouprow">
<td><%=r.Enter_New_Expense_Category%></td>
<td><%=totact%></td>
</tr> <%}
}%>
</tbody>
</table>
<img src="<%=thisapp.getChartUrl("PIE","Expense Pie Chart","Category","Actual Expense",actualExpense,"500","500")%>"/>
<%}
}%>