Adding a variable to a RTC Report

njervnjerv Member Posts: 5
edited 2010-06-04 in NAV Three Tier
Hi All,

I'm hoping somebody can help me with a problem I'm having.

I've created a new report which is a purchase order that is emailed. On the report I have a decimal variable called deCarriage. On the purchase line there is a new boolean which dictates whether the line is carriage or not. All the lines ticked should be skipped in the body of the report and totalled into the deCarriage field and displayed along with the breakdown of the totals at the bottom of the report. This works fine when I run the report in the classic client but I cannot get the value to appear in the RTC.

In VS I've added a field with the expression "=Fields!deCarriage.Value" to the body of the report and on the footer I've added a field with the expression "=Sum(ReportItems!deCarriage.Value)". When I run the report no value appears in the footer, not even 0.00.

I'm sure something simple is required to fix this but I've searched this forum, googled, and spent too much of my time trying to get it to work to no avail.

Any help or suggestion would be greatly appreciated.

Neil

Comments

  • chrisgrill3chrisgrill3 Member Posts: 18
    I believe you need to add that field first to the Sections (Classic report design), set the source and the field name there. Then it will be available in the VS report designer as an actual field.
  • njervnjerv Member Posts: 5
    Thanks for your reply.

    I have the field added to the sections of the classic design and it is available on the RTC version of the report but I've added the field to the report and no value is being displayed.

    I'm sure it is something simple I'm missing, all help appreciated!

    Thanks
  • mihail_kolevmihail_kolev Member Posts: 379
    If you try to put this variable in report header or footer it won't show, there's another way...
    ...or check out the dataset of the report - Run the report and in preview mode press CTRL+ALT+F1, restart the report and repeat. Find your var. and see if there is some value or it's empty.
    -Mihail- [MCTS]
  • njervnjerv Member Posts: 5
    Thanks for your reply. I didn't know about Alt+Ctrl+F1 tip, very useful.

    The value of the variable is populating fine on the lines but it isn't totalling and showing in the footer. Is it possible to show the sum on a variable in the footer?

    Thanks
  • mihail_kolevmihail_kolev Member Posts: 379
    you should add this field somewhere in the Table and set Hidden -> True, then in the footer put the ReportItems!textboxname.Value . Or define custome code and get it from there. Google it, I really don't have the time right now :) good luck

    aah, just found it http://blogs.msdn.com/b/nav_developer/a ... esign.aspx
    -Mihail- [MCTS]
  • njervnjerv Member Posts: 5
    I've added the field to the body and to the footer already. The expression I have in the footer is "=Sum(ReportItems!deCarriage.Value)", is this correct?

    Thanks for the link but it appears to be for labels rather than fields.

    Thanks
  • mihail_kolevmihail_kolev Member Posts: 379
    Should work for variables. In the footer, the value should be just ReportItems!deCarriage.Value, the SUM (if needed) must be in the body. But the row in the body must be always visible (the textbox is hidden).
    -Mihail- [MCTS]
Sign In or Register to comment.