index | search | no replies | posting guidelines | help | login | register |
Index » Products » ASP Report Wizard v2 |
| |||||||
Jan 25 2005, 5:09 AM |
| ||||||
Dreamer from: New York | I have two columns in my access mdb called sales_2004 and sales_2005. I would like to create a calulated column that shows the percent of the two number. I placed the following in the text replacement for the percent colum. %[eval]{{sales_20004}} / ({{sales_2005}} * 100[/eval] But nothing shows up. the resulting numbers in the sales columns are aggregated and grouped by Month. Also , once I place this code in the text replacement, how do I edit it? The only way I see to get back in to change it is to have to add it again. Please Help. | ||||||
Jan 25 2005, 6:00 AM |
| ||||||
ghost from: Washington, DC | I'm not sure but try to verify the statement below: Your statement: %[eval]{{sales_20004}} / ({{sales_2005}} * 100[/eval] try this: %[eval]{{sales_20004}} / ({{sales_2005}} * 100)[/eval] ------------------------- Ghost | ||||||
Jan 25 2005, 6:05 AM |
| ||||||
Dreamer from: New York | Nope, think the issue is that the results are totals of the sales_2004 and sales_2005, it is a summary report and I would lke the percentage of the final sum. | ||||||
Jan 25 2005, 6:09 AM |
| ||||||
Dreamer from: New York | I also have my percentage results showing as 12.987743232%, how do I round this to two decimal places. Thanks so much !! | ||||||
Jan 25 2005, 7:25 AM |
| ||||||
whichman from: Laurel, MD | This is a bit tricky but try the following: By default when you do summary reports, the summary fields are renamed using the summary types e.g. if your fields where of the format: Field1, SUM(Field2), SUM(Field3), AVG(field1), thenyour field names will be: FIeld1, SUM_1, SUM_2,AVG_1 so try this: %[eval]({{SUM_1}} /{{SUM_2}})* 100[/eval] To round numbers in javascript consider the following: var original=28.453 thus you can use the following to round your values to 2 decimal places: //for your summary report ------------------------- Master of the Game | ||||||
Jan 25 2005, 7:53 AM |
| ||||||
Dreamer from: New York | That did it !! Thanks so much, did not know the names of the summary columns. Rounding also worked. Thanks !!! | ||||||
Jan 25 2005, 7:59 AM |
| ||||||
Dreamer from: New York | Now it seems that my graphs do not show? Any idea? | ||||||
Jan 25 2005, 9:24 AM |
| ||||||
Dreamer from: New York | And I lost my paging functionality?? | ||||||
Jan 25 2005, 9:44 AM |
| ||||||
ghost from: Washington, DC | Does it work without the TextReplacement ? Also, can I see your TextReplacement text!------------------------- Ghost | ||||||
Jan 25 2005, 11:04 AM |
| ||||||
Dreamer from: New York | Here is my Text Replacement, Seems that since I added it, even other Reports have lost their graphs and ability to page. [eval](Math.round((({{SUM_2}}/{{SUM_1}})*100)*100)/100)[/eval] % I even created a new report with a graph and it does not show up. Thanks, | ||||||
Jan 25 2005, 11:26 AM |
| ||||||
Dreamer from: New York | If I take the percent column out of the report I get my graph and paging back. Hmmm... Any ideas? | ||||||
Jan 25 2005, 12:02 PM |
| ||||||
Dreamer from: New York | Found it, looks like if any of the columns are NULL all bets are off. | ||||||
Jan 25 2005, 3:15 PM |
| ||||||
ghost from: Washington, DC | Will report this bug tomorrow ------------------------- Ghost | ||||||
Jan 27 2005, 12:21 PM |
| ||||||
ghost from: Washington, DC | //for regular reports ------------------------- Ghost | ||||||
Pages: (1) [1] |