Rank: Member
Groups: Registered
Joined: 7/14/2023(UTC) Posts: 25 Location: Torino Thanks: 8 times
|
Hello, in my report I nedd to calculate the (price*hour)+hardware_cost, and other datas that involve the "price" value Hour | hardware_cost --------------------- 1.00 | 0 1.00 | 200 1.50 | 10.6 1.75 | 15 0.25 | 35 "price" is a constant value of 25, I wish to put that value in a variable in order to avoid repeating it n times inside my model code. In other model I have the same "price" value to use so, if is possible, I would like to define a global variable in the report to use inside them. In this way if I have to change the "price" value, I have not to change it in all my model, but only one time for all the report. I have try to use collection, but it does not work. For what I understand, the collection are used only to filter data, is that right? Can you please provide an example about this? Edited by user Tuesday, August 8, 2023 10:08:42 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
You may try this: Create a task Loop for each model in your report. Select the element involved by the calculation Assign the SQL property with your formula having 25. Note that you may use also global scripts defined with the Server Manager to share scripts or functions amongst reports. Edited by user Tuesday, August 8, 2023 10:07:07 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/14/2023(UTC) Posts: 25 Location: Torino Thanks: 8 times
|
I am sorry but I have not understand...can you provide a simple example please?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/14/2023(UTC) Posts: 25 Location: Torino Thanks: 8 times
|
Hi any news about my topic?
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.