Helle,
I have problem, because i would like get Exchange Rate from other table in my report (Header Section).
I now that i must use GET function, but i try using this function in 1000 ways:), and its doesn't work.
I try some think like this:
Variable:
Exchange -- record -- Table of Exchange Rate
IF Exchange.GET(Exchange."No.",Exchange."No."Currency Code") THEN;
THIS IS A PRIMARY KEY OF TABLE - EXCHANGE RATE
Please, tell me what i doing wrong.
James
0
Comments
you write wrong primary key's value.
IF Exchange.GET(Exchange."No.",Exchange."No."Currency Code") THEN;
1. In above statement syntax is wrong, you forgot to put , (Comma) between two fields.
2. "No." is writen twice.
Your syntax should be like this.
IF Exchange.GET("No.","Currency Code") THEN
Begin
Do Something
End
OR
IF Exchange.GET(Exchange."No.",Exchange."Currency Code") THEN
Begin
Do Something
End
This may solve your problem.
Thanks & Regards,
Purvesh Maisuria.
Thanks for answer,
I try doing to what You say, but it doesn't work, mayby I must doing SETRANGE??
Thanks,
Use this, not or part.
IF Exchange.GET("No.","Currency Code") THEN
Begin
Do Something
End
Now what is your recored/table variable in report (Header Section) ?
in GET function there are "No." & "Currency Code" is of record variable.
Try to do it with static information first like below.
IF Exchange.GET('XYZ123','USD') THEN
Begin
Do Something
End
Thanks & Regards,
Purvesh Maisuria.
Thans for all,
If i solve a problem - i will write:)
so better use
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I tried use static variables and it's run:
IF Exchange.GET('TEST','EUR') THEN
Message(FORMAT(Exchange."Relational Exch. Rate Amount"));
But if I substitue variables it's doesn't work.
I don't understand this situation.
Pargesoft
I showed the table of exchange rates,
I will add that I use Get function in Header OnPreDataItem.
I don't know where i must use function Exchange.SETRANGE...
in your first post:
IF Exchange.GET(Exchange."No.",Exchange."No."Currency Code") THEN;
As pointed out Exchange."no."currency code" is wrong but that wouldn't have worked anyway.
the values inside the parenthasis that match the primary key of the exchange table (the table info you want to get) can't be from the same table. It should be from fields of your dataitem.
Example lets say I want "GET" customer table info but I have "sales header" as my dataitem.
variable->cust->record->customer
if Cust.get("Sales Header"."Sell-to Customer No.") then.....now you can get values from the customer table.
Your first post is basically saying
if Cust.Get(Cust."No.") then...which won't work.
If the dataitem you are using doesn't have the values you need to fill the primary key of the "Get" table then that's when you use FIND,FINDLAST,FINDFIRST...
Put your find onaftergetrecord of the dataitem in your report. you didn;t specify your dataitems se we can't give any more details.
http://www.BiloBeauty.com
http://www.autismspeaks.org