I have 2 datasource that have the fields acct num, pay date, payment amount with different limited criteria.
I want to pull the first payment amount so I sorted the datasource by acct, date then did first(datasource.pay_date). Those all work fine for those 2 fields from each datasource.
But I now need another textbox that combines the two first payments from those two sources but I'm getting an error that it cannot turn an object into an int and asking me if I have forgotten a cast.
Is there a way around this?
Adding two fields using First Function
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: Adding two fields using First Function
Hello,
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Re: Adding two fields using First Function
we are locked down and unable to share. Can you tell me what format a field takes when you use the First function and if there is a way to convert that format?
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: Adding two fields using First Function
Hello,
You can check it in the Dictionary:
object First (object expression)
You can use Parse methods - {Decimal.Parse(First(datasource.column).ToString())}
Thank you.
You can check it in the Dictionary:
object First (object expression)
You can use Parse methods - {Decimal.Parse(First(datasource.column).ToString())}
Thank you.
Re: Adding two fields using First Function
I'm getting this error now
- Attachments
-
- exp.jpg (28.82 KiB) Viewed 596 times
-
- err.jpg (18.43 KiB) Viewed 596 times
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: Adding two fields using First Function
Hello,
What product and version are you use?
Thank you.
What product and version are you use?
Thank you.