Wednesday, July 29, 2015

Identify Company based on Colors

This Post will explain how one can set various colors to Company Name in RTC if your Customer has more than one legal entities(Company).

If your customer has more than one legal identity and wants to identify each legal entity based on its color, you need not bang your head over this. Dynamics NAV has an option that allows us to specify  System Indicator Styles for each company. By defining unique System Indicator Style for each company, You can identify it with unique colors.

However, There is a limitation for this. Microsoft Dynamics NAV allows us to define only 9 System Indicator Styles apart from the standard style. In simple words, you can define upto 9 different colors for companies in NAV RTC.

Now, Am going to explain how it is done: 

Go to the Company Information Page from Departments/Administration/Application Setup/General
Then, Go to the System Indicator fast tab of Company Information page. 
By default,The value of System Indicator Style will be populated as Standard.
However, users can choose from a list of options namely Accent1,Accent2,...,Accent9
The System Indicator Style field will determine the color of company name to be displayed.
For example Accent1 is RED, Accent2 is BLUE  and Accent9 is GRAY.

Hope this helps.

Tuesday, July 28, 2015

How to disable personalization of the Roletailored Client in Dynamics NAV

In this Post, I am going to explain how to disable personalization of the roletailored client in Dynamics NAV.
 
Dynamics NAV allows users to personalize the pages.

If you want to disable the personalization of RTC for your customers, you can do it by following the below steps.

Open RTC in configuration mode and go to:

Departments > Administration > Application Setup > RoleTailored Client > Profiles

edit the desired profile and check the Disable Personalization field.


After doing this, the customize part will be disabled and your customers will not be able to make any personalizations in the roletailored client.
  

How to change the Startup splash screen of Dynamics NAV

In this post, am going to explain how we can change the splash screen of NAV during startup.

Basically, Dynamics NAV fetches the splash screen image from a certain directory. So, If you can edit the image or replace it with another image (Of course with same resolution), you can manage to change the startup splash screen of Dynamics NAV.


Below location is where Dynamics NAV accesses the splash screen image from:

C:\Program Files (x86)\Microsoft Dynamics NAV\71\RoleTailored Client\Images

The filename of the Splash screen image is "Splash.PNG"

Now, edit whichever picture you want to put as your NAV Startup Splash Screen and save is as "Splash.PNG".

Replace this image in the above mentioned directory location.

VOILĂ€! your Splash screen is now changed!

Monday, July 27, 2015

How to Display Multiple Lines In a Message box or an Error Window?

This post is for people who have recently joined and are still Learning NAV.

In Programming Languages like C & C++ , the new line Character used is "\n".

However, in Dynamics NAV, the new line Character is "\".

Let's see an example:

Text0001 := 'This is the first line of message. \ This is the second line of message.';

MESSAGE(Text0001);

When i run these lines of code, the resultant output will be  

---------------------------
Microsoft Dynamics NAV
---------------------------

This is the first line of message.
This is the second line of message.
---------------------------
OK  
---------------------------


This can also be done like this:



MESSAGE('This is the first line of message.  \  This is the second line of message.');

The resultant output will still be
---------------------------
Microsoft Dynamics NAV
---------------------------

This is the first line of message.
This is the second line of message.
---------------------------
OK  
---------------------------



Hope you find this useful.
 
 

Mail Merge Report using Word Automation in NAV 2013r2

In this post, I'm going to explain how to create a mail merge report and send it to customer using word automation.

Pre-Requisites:
  • Word Automation should be installed.
  • Word Application, Document and Range variables should be used.
  • Preferably, a separate code unit should be used for word automation.
  • Mail merge template (Preferably in .DOT extension).
  • SMTP mail setup should be used for mailing.
  • Suitable action item from the respective card page should be used to call this code unit from current record.
  • In case of server implementation, use a shared folder to save the mapped word document and attach it in the mail.

steps to Create a mail merge document template:
  • Open word application.
    Go to Insert tab =>quick parts => Merge field => select mail merge.T
  • ype the name of the merge field and press OK.
  • Repeat the steps to create multiple merge fields as per your requirement.
  • Type the letter content as per your requirement.
  • Save the document as <DOCNAME>.DOT
Where to Place Automation Code:

You put all code in a separate code unit that is called from a menu item on the page.

It is recommended that you isolate the code that uses Automation in separate codeunits since Automation server must be installed on the computer, which compiles an object that uses Automation. You need to recompile and modify the entire object if the Automation server is not installed on your computer.It is best that the Automation code be placed in a separate codeunit than be defined as a function in any other codeunit.

Performance can be an issue if extra work is needed to create an Automation server with the CREATE system call. If the Automation server is to be used repeatedly, then you will gain better performance by designing your code so that the server is created only once instead of making multiple CREATE and CLEAR calls.

Variables

Name                  DataType                Subtype                    Length
WdApp                  Automation        'Microsoft Word 14.0 Object Library'.Application   
WdDoc                  Automation         'Microsoft Word 14.0 Object Library'.Document   
WdRange              Automation        'Microsoft Word 14.0 Object Library'.Range   
CompInfo                  Record            Company Information   
TemplateName         Text                                                       250
FileName                  Text                                                       250
SMTPMail              Codeunit             SMTP Mail   
SMTPSetup            Record                SMTP Mail Setup   
Cust                        Record                Customer   
Mail                        Codeunit             Mail   
Sales&RecvSetup   Record                Sales & Receivables Setup     
SalesHeader            Record                Sales Header

Before starting,go to the codeunit's properties and set the codeunit's  table No. to the associated page that you need to send mail from.

 Sample Code :
//Word Automation Begin

 IF CREATE(WdApp,TRUE,TRUE) THEN BEGIN // Initialize word application
 FileName := FORMAT("Sales&RecvSetup"."Server  Destination")+FORMAT(Description)+'TenderDocument.Doc';
  "Template Name" := "Sales&RecvSetup"."Template Location";
  WdDoc := WdApp.Documents.Add("Template Name"); // this enables word application to use the template
  WdApp.ActiveDocument.Fields.Update; // Initialize the document

  WdRange := WdApp.ActiveDocument.Fields.Item(1).Result; // This sets the range to the particular merge field using array Index
  WdRange.Text := "Bill-to Name"; // returns the customer name from the current record.
  WdRange.Bold := 1;

  WdApp.Visible := TRUE;
  WdApp.ActiveDocument.Fields.Unlink; // this will map the table records to the word document
  WdApp.ActiveDocument.SaveAs(FileName);
  WdApp.Quit;
  CLEAR(WdApp);
  //Word Automation End
 
  //SMTP Mail Begin
  SMTPSetup.GET;
  IF Cust.GET("Bill-to Customer No.") THEN BEGIN
    Cust.TESTFIELD(Cust."E-Mail");
    SMTPMail.CreateMessage(COMPANYNAME,CompInfo."E-Mail",Cust."E-Mail",'Sales Invoice','',TRUE);
    SMTPMail.AppendBody('Dear Sir / Madam,');
    SMTPMail.AppendBody('<br><br>');
    SMTPMail.AppendBody('Please Find the attached Sales Invoice.');
    SMTPMail.AppendBody('<br><br>');
    SMTPMail.AppendBody('Thanks for doing business with us.');
    SMTPMail.AppendBody('Regards,');
    SMTPMail.AppendBody('<br><br>');
    SMTPMail.AppendBody(CompInfo.Name);
    SMTPMail.AppendBody('<br><br>');
    SMTPMail.AppendBody('<HR>');
    SMTPMail.AppendBody('******This is a system generated mail. Please do not reply to this email ID.******');
    SLEEP(4000);
    SMTPMail.AddAttachment(FileName);
    SLEEP(4000);
    SMTPMail.Send;
    MESSAGE(Text0001);
    END;
    CLEAR(WdApp);
    END;
 //SMTP Mail End

**Note:
1. Use sleep function before and after calling add attachment function because it takes few seconds for the system to save your document and then attach the same. use CLEAR system calls if you plan to use this function multiple times.
2. Use a shared folder from the server in case if you are planning to implement this over a server. since the add attachment will look for the file from the server, it will throw an error that the file is missing or not available. if you are using this from your local machine's database, then it wouldn't be a problem.


Finishing Touch:
You can attach this code unit to an appropriate card page in a menu item from which the mail needs to be sent. By calling the codeunit, you'll have to pass the current record REC as a parameter.
Note: 

A much simpler way to use MS-Word for reports is available in NAV 2015. This process is the primitive method to connect to word application from NAV using Automation variables.

Please leave your queries in the comment section.
 

Friday, July 24, 2015

How to make payment against invoice using Payment Journal

Payment Journal


To open Payment Journal, select Financial Management --> Cash Management --> Payment Journal

Payment Journal is used to post the payment to be made to the Vendor.

Steps to be followed when entering journal and applying the entry to invoices.
  1. Enter the Posting Date.
  2. Select a Document Type of Payment.
  3. Leave the Document No. field as it is.
  4. In the Account Type field, select Vendor.
  5. Select the Vendor No. to whom amount is to be paid.
  6. In the Amount field enter the amount to be paid
  7. In the Balance Account Type field, select Bank Account.
  8. In the Bal. Account No. field, select Bank from which the amount is to be paid.
  9. If the amount paid is for single invoice, then select invoice in the Applies-to Doc. Type field and press F6 in the Applies-to Doc. No field to select the invoice No. to which the amount is paid. Here we can select only one invoice to that entry.
  10. If the amount is paid for multiple invoices, then find under Home => Apply entries to open the Apply Vendor entries window. This window displays all the open entries of that Vendor.
  11. Select the Invoices for which the amount is to be paid and click Application => Set applies-to ID.
  12. Click Ok to return to Payment Journal
  13. Click Post => post the Payment Journal.

Thursday, July 23, 2015

Data Security in Microsoft Dynamics NAV

Introduction
The Microsoft Dynamics NAV security system allows you to control which objects or tables a user can access within each database. You can specify the type of access that each user has to these objects and tables, whether they are able to read, modify, or enter data.
You can specify which records are stored in the tables that each user is allowed to access. This means that permissions can be allocated at both the table level and the record level.
The security system contains information about the permissions that have been granted to each user who can access a particular database.
This information includes the roles that the users have been assigned, as well as any permission that they have been granted to individual users.
There are four different levels of security:
  • Database
  • Company
  • Object
  • Record
Graphically, these can be represented as the layers, where the central layer is the records in the database.

Database-level Security
After you start Microsoft Dynamics NAV and attempt to open the database, your credentials are checked. If you have not been granted permission to open the database then the database is not listed in the Available Databases window.
Microsoft Dynamics NAV administrators should have db_owner database role for all relevant Microsoft Dynamics NAV databases.
To grant the db_owner role on a Microsoft Dynamics NAV database in SQL Server Management Studio, follow these steps:
  1. Select the Microsoft Dynamics NAV database, then Security, then right-click Users and choose New User.
  2. Choose the button at the right of the Login Name field to open the Select Login dialog box.
  3. Choose the Browse button, select the check box for the relevant Login, and then choose the OK button.
  4. Choose the OK button to exit the Select Login dialog box.
  5. Enter a User name for the user. This can be the same as the login name.
  6. In the Database User - New dialog box, under Select a Page, choose In the Database role membership.
  7. Select the db_owner check box.
  8. Choose the OK button to exit the Database User - New dialog box.


Company-level Security
After you have gained access to the database, you can open the company that you want to work with.
Use the Microsoft Dynamics NAV Windows client to open a company. The Select Company window lists all of the companies that have been created in the current database and that you have been given permission to access. If there are companies in the database that you have not been given permissions to access, you will not be able to see them in this window.
A Microsoft Dynamics NAV database can contain several companies. Each company can use its own tables and can also share tables with other companies.
When you assign a permission set to a user, you can specify a company to restrict the user’s access for that permission set to that specific company.
Menu Path: CRONUS India Ltd./Departments/Administration/IT Administration/General/Users




Object-level Security
Object-level security is the set of permissions on Microsoft Dynamics NAV objects that constitute a permission set. Permission sets determine the access that users have and the tasks that users can perform on objects in the database.
You can define permissions for all types of objects in a Microsoft Dynamics NAV database.
Object Type
Description
Table Data
The actual data that is stored in the tables.
Table
The tables themselves.
Pages
The pages that are used to view and enter data.
Report
The reports that are used to present the data.
Codeunit
The codeunits that are used in the database.
XMLport
The XMLports that are used to import and export data.
MenuSuite
The object that contains the menus that are displayed in the navigation pane.
Query
The object that you use to specify a dataset from the database.
System
The system tables in the database that allow the user to make backups, change license files, and so on.


The various permission sets that exist in Microsoft Dynamics NAV determine the actions that you can perform on these objects.

Permissions on Objects

Permission
Description
Read
You can read this object.
Insert
You can insert data into this object.
Modify
You can modify data in this object.
Delete
You can delete data from this object.
Execute
You can run this object.


If you have been granted permission to read a page, then you can open the page and view the data that it displays. If, however, you do not have write permission, you are not allowed to enter data into this page.
Sometimes, when you open a page it displays information from several tables. To access this page, you must have permission to view all the data displayed by the page. You might not have permission to read directly from all the tables that the page uses. In this case, you must have indirect permission to read from the tables in question. Having indirect permission to a table means that you cannot open the table and read from it but can only view the data it contains indirectly through another object, such as a page or report, that you have direct permission to access.
Microsoft Dynamics NAV has a number of standard predefined security permission sets. You can use these permission sets as defined or you can change a permission sets to suit your particular needs. You can also create your own permission sets and assign them the permissions that you want.

Record-level Security
Record-level security lets you limit the access that a user has to the data in a table.
You can implement record-level security in Microsoft Dynamics NAV by creating security filters on table data. A security filter describes a set of records in a table that a user has permission to access. You can specify, for example, that a user can only read the records that contain information about a particular customer. This means that the user cannot access the records that contain information about other customers.
To set a security filter
  1. In the Search box, enter Permission Sets, and then choose the related link.
  2. On the Permission Sets page, select the permission set to which you want to add a security filter, and then choose Permissions.
  3. On the Permissions page, on the row for the table data to which you want to add a security filter, in the Security Filter column, choose the AssistEdit button.
The Table Filter page opens.
  1. In the Table Filter page, in the Field Number column, select the field on which you want to limit a user's access. For example, if you want to create a security filter so that a user can view only sales with a specific customer posting group, then choose the field number for the Customer Posting Group field.
The Field Caption column in the Table Filter page is filled in automatically after you select the field number.
  1. In the Field Filter column, enter the value of field that you want to use to limit access. For example, to limit a user's access to only domestic customer’s sales, enter DOMESTIC, which is the customer posting group for domestic customers, in the Field Filter column.


Similarly we have added security filter for Location Code.


Finally, the particular user is restricted to access only the customers of Domestic (Customer Posting Group = DOMESTIC) and BLUE, YELLOW (Location Code = BLUE & YELLOW) locations.







Customer List page of user shows only the customer related to him.



When the user is creating sales order, even the Customer List window will show only the related customers since security filter has been applied at customer table itself.









Similarly for Location list.














If the user is running a report, security filters are applied in the report filter page and the user can’t see the records of restricted customer/location.









Note

Record level security filters do not support wildcard characters. This means that you cannot use * and ? in the filters. You can use the other symbols, delimiters and, operators, such as, <, >, |, &, .., and =. If you do not enter an operator, then the default operator = is used.



Security filters support Unicode characters. The maximum length of a security filter is 504 characters, which includes all of the delimiters, symbols, and operators.


When multiple permission sets that refer to the same table data are assigned to a user, they are combined so that the least restrictive filter is used. You should not repeat a table in multiple permission sets if you plan to combine those permissions sets for one user.

Number Series

Number Series


The No. Series window is used to set up all the number series that is used for the company. Number series can be assigned to certain tables (such as the Customer, Vendor and Item tables), sales and purchase documents (such as quotes, shipments and posted invoices), and journal templates and batches.
You can set up a complete numbering system consisting of an unlimited number of number series for all types of basic information (except G/L accounts) and documents. You can combine this with manual numbering for specific areas or you can use manual numbering entirely.
The document numbering functionality provides a flexible way of numbering all documents, journals, batches and journal lines. Documents include, but are not limited to orders, invoices, shipments and credit memos.
In the setup table for each application area and in the journal templates, you specify which No. Series will be used for which purpose. For example, if you have set up a No. Series for customers, you would enter the code for this No. Series in the Customer Nos. field in the Sales & Receivables Setup table. Then when you create a new customer, the program will use the information associated with the code to assign the customer number.
In the No. Series window, you set up codes for each type of document.

To open the No. Series window, select Financial Management / Administration / No. Series.


First, enter a code that is meaningful or relevant for your business, and then give the code a description. The program fills in the Starting No. field and Ending No. field with the information set up in the Number Series Line table.
The Last Date Used and Last No. Used fields are filled in automatically by the program, when start using the No. Series.
In the Default Nos. field, indicate whether or not this number series will be used to assign numbers automatically. For example, if a check mark is placed on the line for the customer number series, when you create a new customer, the program will assign the next available customer number from this number series. If a check mark is not placed in this field, then click the Assist Button in the No. field on the customer card and then choose the number series in order to have the program assign a number for you.
A check mark in the Manual Nos. field indicates that you can enter numbers manually instead of using the number series. A check mark in this field has no effect for number series used in journals.
A check mark in the Date Order field indicates that numbers from this range are to be assigned chronologically. In other words, if you place a check mark here, the program will run a test at the time of posting to make sure documents and Journal lines are assigned numbers in ascending order according to the posting date.
A number series will be associated with one or more lines in the No. Series Lines table, where you set up additional information about the number series.
In the No. Series window, select a line, and then click Navigate => Lines.


This window lets you establish the numbering you want to use (including starting dates for specific ranges of numbers) and set up additional information about the number series.

The first field is the Starting Date field. Here you can enter the date from which you would like this line to apply. You use this field if you want to start a new No. Series at the beginning of a new period. You set up a number series line for each period. The program will automatically switch to the new series on the starting date. If left blank it will take effect immediately.

In the Starting No. field and Ending No. field, you define the range of numbers you will use for that particular code. These fields are alphanumeric and have a length of 20 characters to allow flexible schemes.

The contents of the Last Date Used field and Last No. Used field are generated by the program and will display the last date a number was assigned and the last number in the series that was used. The contents of these two fields are also displayed in the No. Series window.

The Warning No. field lets you choose a number from your predefined series that will return a warning when it is used. It should be used to help you when you are nearing the end of a number series.

The Increment by No. field allows you to select the size of the interval by which you would like your numbering to increase. If you use an increment rather than consecutive numbers, this would allow the future addition of numbers in that range and in between the assigned numbers. If at a later date, you want to insert one manually, you could assign if you allow for an interval between numbers rather than making them consecutive.

The Open field indicates whether or not the number series is open. A series will remain open until the last number in it is used. At that time, the program removes the check mark from this field. This field is not editable.

Sometimes, you may want to assign more than one No. Series Code to a single No. Series field. For example, if you have more than one No. Series for inventory items, you can setup a relationship between these No. Series.

The No. Series Relationships window is used to set up relationships between multiple No. Series. When you set up relationships you must associate all of the related No. Series to one No. Series code. You can then enter this code on the Numbering tab in the setup window for the appropriate application area and you will be able to choose between all the related No. Series when assigning numbers.

In the No. Series window, in the Code field, find and select a line to which you want to set relationship.

Click Series => Relationships. The No. Series Relationships window appears.
Here you can set relationship for the No. series.

Automatic Archiving

Automatic Archiving
The program can be set up to create archive versions of sales and purchase documents automatically.
For sales documents, set up automatic archiving in the Sales Receivable Setup window, which can be accessed by clicking Departments > Sales & Marketing > Administration > Sales & Receivables Setup.
Select the Archive Quotes and Orders check box for the program to save a copy of a sales quote that is being converted into an order and a sales order that is being posted.
As you have archive versions of a sales quote, you can roll it back to any of archived copies.

NOTE: For purchase documents, the program can also be set up to create archive versions automatically. For that, select the Archive Quotes and Orders check box in the Purchases & Payables Setup window.
You can view the list of document archives in history.

Best Implementation Practices
Document Archive functionality can be used, if you require to maintain Amendments in Sales and Purchase Orders.

Wednesday, July 22, 2015

What happens when a report runs

When a Report Runs,
When you initiate the report run, the OnInitReport trigger is called. This trigger performs any processing that is necessary before the report is run. It can also stop the report. If the OnInitReport does not end the processing of the report, the request form for the report is run, if it is defined. Here, you select the options that you want for this report. You can also decide to cancel the report run. If you decide to continue, the OnPreReport trigger is called. At this point, no data has yet been processed. When the OnPreReport trigger has been executed, the first data item is processed provided that the processing of the report was not ended in the OnPreReport trigger.
When the first data item has been processed, the next data item, if there is any, is processed in the same way. When there are no more data items, the OnPostReport trigger is called to do any necessary post processing, for example, removing temporary files.
How a Data Item is Processed
Before the first record is retrieved, the OnPreDataItem trigger is called, and after the last record has been processed, the OnPostDataItem trigger is called.
Between these two triggers, the data item records are processed. Processing a record means executing the record triggers and outputting sections. C/SIDE also determines whether the current record should cause the outputting of a special section, such as a header, footer, group header or group footer.
If there is an indented data item, a data item run is initiated for this data item (data items can be nested 10 levels deep).
When there are no more records to be processed in a data item, control returns to the point from which processing was initiated. For an indented data item, this means the next record of the data item on the next highest level. If the data item is already on the highest level indentation is zero control returns to the report.

issue while upgrading Navision 2013 to Navision 2015

We faced an issue while upgrading Navision 2013 to Navision 2015 with one of our client.
The issue with the fields Amount and Amount (LCY) in the Vendor Ledger Entry and Customer Ledger Entry and its value is not get updated after the upgrade process.
Hence, Issue reflects in the Customer Detailed Trail balance and Vendor Detailed Trail Balance Reports.    
Reason
In 2015, Microsoft includes a Boolean field named as Ledger Entry Amount in both Detailed Vendor Ledger Entry and Detailed Customer Ledger Entry and this field gets updated on every new record entry on both the tables except the record with the "Entry Type" as Application or Appln. Rounding. 
The flow field filters of the fields Amount and Amount (LCY) is based on the above Ledger Entry amount field in Navision 2015 (But not in Navision 2013, 2013 R2). So there is no way to update the values for the fields Amount and Amount (LCY) for the records which has upgraded from Navision 2013.              
Solution
To update the values for the field Ledger Entry Amount in both the tables, we should write a processing only report with the Data items as Detailed Customer Ledger Entry and Detailed Vender Ledger Entry with the Data Item filter as "Entry Type" with values
Initial Entry|Unrealized Loss|Unrealized Gain|Realized Loss|Realized Gain|Payment Discount|'Payment Discount (VAT Excl.)'|'Payment Discount (VAT Adjustment)'|Payment Tolerance|Payment Discount Tolerance|'Payment Tolerance (VAT Excl.)'|'Payment Tolerance (VAT Adjustment)'|'Payment Discount Tolerance (VAT Excl.)'|'Payment Discount Tolerance (VAT Adjustment)'|Correction of Remaining Amount.
Please aware of the above issue while upgrading lower versions of Navision into Navision 2015.
There is one more issue regarding the same on the Report 595 in Navision 2015 , but i hope it gets fixed in the Cumulative updates of Navision 2015.


Article Source: JayaMurugan.P, Technical Consultant, CETAS Information Technology, Chennai

How to Open the RoleTailored Client in Configuration Mode

To configure a profile, you must open the RoleTailored client in configuration mode. 

When you open the Role Tailored client in configuration mode, you can make changes to a Role Center. These changes then become part of the Role Tailored client for users assigned to the profile associated with the Role Center.

To open the Role Tailored client in configuration mode, follow the below steps:


Step 1: Open command prompt

Step 2: Navigate to the root folder of the Role Tailored client.

Example: CD C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client

Step 3: Type the following command.

Microsoft.Dynamics.Nav.Client.exe -configure -profile:profile-id

Example:

Microsoft.Dynamics.Nav.Client.exe -configure -profile:"Accounting Manager"

 


 

 

Sunday, July 19, 2015

Pages that needs to be configured in order to configure a new company

You need to configure the below pages in order to configure a new company
Steps for setting up a new company
  1. Create new company
  2. Company information
  3. Accounting periods
  4. No. Series
  5. Chart of accounts
  6. Dimensions
  7. G/L Setup
  8. Sales & receivables setup
  9. Purchases & payables setup
  10. Inventory setup
  11. Customer posting group
  12. Bank posting group
  13. Vendor posting group
  14. Inventory posting group
  15. Gen. bus. Posting group
  16. Gen. prod. posting group
  17. Location
  18. Gen posting setup
  19. Inventory posting setup
  20. VAT posting setup
  21. Currency
  22. Vendor
  23. Customer
  24. Item

Friday, July 17, 2015

Summation of a field in report with groups:

Summation of a field in report with groups:
write code in Report Properties:
Shared Total as Decimal

Public Function SetTotal(ByVal Value as Decimal)
Total+=Value
End Function

Public Function GetTotal
Return Total
End Function
And then call GetTotal Function in respective table box(in report) where you want to get the Total
Code.GetTotal
And then in report , data for which you need total to be calculated. In that text box, call SetTotal function

=Fields!BudValue.Value+Code.SetTotal(Fields!BudValue.Value)