math function

This is the place for queries that don't fit in any of the other categories.

math function

Postby ChristopherL » Mon Sep 02, 2013 1:51 pm

Hi, i am wondering if this code might work for me?
For the moment I don't have access to the data source but they wanted me to add this column to a report..
Think it's written properly?

Code: Select all
t.addData((row_nr,12),format100Sep((float(row['DEAL_MARGIN'])/float(row['COUNTER_AMT']))*100),0))
ChristopherL
 
Posts: 13
Joined: Tue Jul 16, 2013 2:03 pm

Re: math function

Postby metulburr » Mon Sep 02, 2013 2:11 pm

Code: Select all
t.addData((row_nr,12),format100Sep((float(row['DEAL_MARGIN'])/float(row['COUNTER_AMT']))*100),0))

what is "t" suppose to be?
New Users, Read This
OS Ubuntu 14.04, Arch Linux, Gentoo, Windows 7/8
https://github.com/metulburr
steam
User avatar
metulburr
 
Posts: 1312
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: math function

Postby stranac » Mon Sep 02, 2013 2:20 pm

Of course not.
You have an extra closing parenthesis.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1093
Joined: Thu Feb 07, 2013 3:42 pm

Re: math function

Postby ChristopherL » Mon Sep 02, 2013 2:21 pm

metulburr wrote:
Code: Select all
t.addData((row_nr,12),format100Sep((float(row['DEAL_MARGIN'])/float(row['COUNTER_AMT']))*100),0))

what is "t" suppose to be?


oh sorry

Code: Select all
t = pdfEngine.table(1,2)
ChristopherL
 
Posts: 13
Joined: Tue Jul 16, 2013 2:03 pm

Re: math function

Postby ChristopherL » Mon Sep 02, 2013 2:22 pm

stranac wrote:Of course not.
You have an extra closing parenthesis.


where? can you please show where I am suppose to edit?
ChristopherL
 
Posts: 13
Joined: Tue Jul 16, 2013 2:03 pm

Re: math function

Postby allonsy » Mon Sep 02, 2013 2:25 pm

Your last closing parenthesis is superfluous.
allonsy
 
Posts: 9
Joined: Sat Aug 31, 2013 3:42 pm


Return to General Coding Help

Who is online

Users browsing this forum: freddyhard and 2 guests