Options

Decimal Variable in Report Footer RTC

Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
edited 2012-06-14 in NAV Three Tier
Hi Guys!
I know that when we speak about Report in RTC it is not easy to find a solution, but I try to ask anyway :D.
I'm trying to create a Customization of the Sales Shipment taking standard report as example. All works except one thing in the footer. I created a textbox in the body and I placed all the fields I want to show in the footer. Example:
=Fields!Item_Exterior_AppearanceCaption.Value + Chr(177) +
 Fields!TXTItemExterior.Value + Chr(177) +
 Fields!Shipping_AgentCaption.Value + Chr(177) +
 ...
With a textbox in the footer I call the function SetData
=Code.SetData(ReportItems!HdrGroup4.Value,4)
And after that in each control in the footer I call the function GetData.
All works. The problem appears when I try to insert a Decimal calculated Variable in the footer. It seems like the function SetData doesn't work properly because if I render the textbox with SetData visible it show "#Error".
This happens with all decimal calculated variable I tried.
I'm wondering if someone has already faced a problem like this and could help me.
Thx in advance and sorry for the long post.
~Rik~
It works as expected... More or Less...

Answers

  • Options
    mihail_kolevmihail_kolev Member Posts: 379
    try to convert the decimal value to string

    .... + Str(Fields!Decimal.Value) + ....
    -Mihail- [MCTS]
  • Options
    Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    try to convert the decimal value to string

    .... + Str(Fields!Decimal.Value) + ....

    Thx Mihail this solves my problem. :thumbsup:
    Many thx!
    ~Rik~
    It works as expected... More or Less...
  • Options
    maya-chanmaya-chan Member Posts: 45
    I try to use Str but it doesn't work to convert decimal to string. Why?
  • Options
    Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    maya-chan wrote:
    I try to use Str but it doesn't work to convert decimal to string. Why?
    You can try also
    Cstr(Fields!YourFields.Value)
    
    Ps. rember to convert all decimal fields.
    ~Rik~
    It works as expected... More or Less...
Sign In or Register to comment.