Tuesday 24 September 2013

Report to display current record in the Form On button click in ax 2009


·         In click method (First Method)
void clicked()
{
    Args                    args;
    ReportRun               reportRun;
;
    super();

    args = new Args();
    args.name(reportStr(NSGEmplVacations));

    reportRun = new ReportRun(args);
    reportrun.report().interactive(false);
    reportrun.query().interactive(false);
                                                                SysQuery::findOrCreateRange(reportrun.query().dataSourceTable(tablenum(EmplTable)),
                  fieldnum(EmplTable, EmplId)).value(Vacations.EmplId);
    reportRun.init();
    reportRun.run();
}
·         In the click method(Second Method)
1.       void clicked()
{
    Args        args;
    ReportRun   reportRun;
    NASVacationTransId      _VacationTransId;
      ;
    args = new args();
    args.name(reportstr(NSG_VacationRequestReport));
    args.record(Vacations);
    args.parm(Vacations.NASVacationTransId);
    reportRun = classFactory.reportRunClass(args);
    reportRun.init();
    reportRun.run();
}

2.       public boolean fetch()
{
    boolean ret;

this.query().dataSourceTable(TableNum(Vacations)).addRange(FieldNum(Vacations,    NASVacationTransId)).value(_VacationTransID);
    ret = super();

    return ret;
}

3.       public void init()
{
    _VacationTransID    = element.args().parm();
    _vacTable           = element.args().record();
    super();

}

Wednesday 11 September 2013

The permissions granted to user 'XXXX’ are insufficient for performing this operation. (rsAccessDenied)


Error while setting server report parameters. Error message: The permissions granted to user 'XXXX’ are insufficient for performing this operation. (rsAccessDenied)

Solution:
1.     Open Internet Explorer
2.     Type the following in the Address bar:
http:// application-tier /Reports/Pages/Folder.aspx
where application-tier is the name of the Team Foundation application-tier report server. You can find the name of the report server by opening Team Explorer, expanding the Reports node, and viewing the properties of a report.

                             

                                



1.     Click the Properties tab and then click New Role Assignment.
2.      In Group or User Name=Everyone, and select all the option then click OK



                           




Monday 2 September 2013

New Line Expression in SSRS

1
       If you want to display the text in a new line at the text box, the following expression can be used.

="Line 1 " + VBCRLF + "Line 2"

Ex : =Fields!AddressLine1 + VBCRLF + Fields!AddressLine2 + VBCRLF + Fields!AddressLine3 

OP: 
 Address1
 Address2
 Address3


Note: If VBCRLF is used first or last part the expression, it has no impact on result. If you want a line in the first or last, then use one more extra VBCRLF.

Job for Date time difference


static void DateDiffInHours(Args _args)
{
    ActivationDateTime ActivationDateTime;
    ACWAPIPEServiceRequestTable ACWAPIPEServiceRequestTableFrom,ACWAPIPEServiceRequestTableTo;
    int HourVal,TimeVal;
    str HourwithTime;
    int64 sdjfsh;
   // FromTime 5637144578
    //Totime   5637144835
    select ACWAPIPEServiceRequestTableFrom where ACWAPIPEServiceRequestTableFrom.RecId == 5637144835;
    select ACWAPIPEServiceRequestTableTo where ACWAPIPEServiceRequestTableTo.RecId == 5637146080;
    //sdjfsh = DateTimeUtil::getDifference(ACWAPIPEServiceRequestTableTo.createdDateTime,ACWAPIPEServiceRequestTableFrom.createdDateTime)/60;
    sdjfsh = DateTimeUtil::getDifference(ACWAPIPEServiceRequestTableTo.createdDateTime,ACWAPIPEServiceRequestTableFrom.createdDateTime);
    info(strFmt("%1",sdjfsh));
    HourVal = int642int(sdjfsh/60);
    TimeVal = sdjfsh - (HourVal*60);
    HourwithTime = int2str(HourVal) + ":" + int2str(TimeVal);
    info(strFmt("%1",HourwithTime));
    info(strFmt("%1",HourVal*60));
 
}


Unable to find appropriate service endpoint information in the configuration object

Error:  "An  occurred during setup of Reporting Services extensions. Reason: Unable to find appropriate service endpoint information in theconfiguration object"
Cause : BIServices port is not deployed.
Resolution :
  • Activate inbound ports BIServices (System Administration > Setup > Services and AIF > Inbound ports)
  • Delete the WCFCONFIG entry in registry under the Dynamics AX current user hive key (HKEY_CURRENT_USER\Software\Microsoft\Dynamics\6.0\Configuration\Orig)
  • Restart the box
  • Try installation again.  If fails then continue with
  • Make the BC proxy user a local admin on the SRS box.
  • Redeploy BIServices services: AOT > ServiceGroups > Right Click BIServices and deploy.
Enviorenment Details  - Dynamics ax 2012 R2

Explanation: Reporting services Extension is a service that occupies a port in Dynamics AX 2012. When ever you use Reporting services extension you need to activate a port BIServices

Steps For Registry :

1.     Click Start, and then click Run.
2.     In the Open box, type cmd and then press ENTER.
3.     In the Open box, type regedit and then press ENTER.
4.  Locate the following subkey in the registry: 
         HKEY_CURRENT_USER\Software\Microsoft\Dynamics\6.0\Configuration\Orig
    5.  Delete the file "WCFCONFIG" file




Workflow Installation and Configuration steps in Ax 2009




Workflow Installation and Configuration steps

1.       IIS should be  installed
(Start ->Administrative Tools -> Internet Information Services Manager)
Note:
(If not present there , go to server Manager -> Features and Summary -> Add Features -> check the “Background Intelligent Transfer Service(Bits)” -> Next ….-> Install -> finish.)




Install everything in server manager ->web server IIS ->Add role services ->check everything          ->Install.

2.       Create new user
 Start ->Administrative Tools -> Active Directory Users and Computers ->User ->RC ->New ->User -> give first name,   logon name -> next ->give password ->next ->finish.

3.       RC the new Account ->Administrator ->property ->Account.  Check
ð  User cannot change password
ð  Password never expires

4.       Go to IIS. Check IIS accessible.

Select Default website -> on right side -> Browse website ->click that link ->IIS will open.

5.       Create one new website for workflow.

RC ->Sites ->Add New Site ->give Site name as “Axworkflow” and select physical path: ”C:\inetpub\workflow”.  Note: (Create one new folder in C:\inetpub\workflow)
Check this in Application pools of IIS.

6.       Start installing AX ->next ->next ->Select Add or remove components ->Select workflow ->
->Username (default come) and give password ->next ->Select website “Axworkflow” ->next
Install ->finish.(warning and completed is ok). Otherwise if error occurs installation does not complete.






7.       Go to IIS ->sites ->Ax workflow ->MS Ax workflow50 will create and in Application Pools also be created.






8.       Go to Authentication -> windows authentication –enable -> others disable.

9.       For 64 bit, Axworkflow ->Microsoft  AX workflow 50 ->RC-> Remove.










10.   Select AXworkflow -> RC-> Add virtual Directory ->give Alias name as “Microsoft  AX workflow 50”(because we deleted that one so create manually for 64 bit) and give Physical path.
We can also use Test Settings to check validation -> ok.
Virtual Directory is created.

11.   RC the new virtual directory created ->Add Application ->give Alias  Name as application pool name and physical path ->ok.It will convert as application.


12.   Go to Authentication ->Disable everything , enable Windows Application.

13.   Go to “Directory Browsing” ->enable it.

14.   Go to AX -> Admin-> Setup -> Batch groups -> Create two groups
1.       WFExe.
2.       WFDue.


15.   Go to batch server tab ->shift the remaining server to select server for both groups we created.




16.   Go to Workflow infrastructure configuration wizard ->next ->next -> validate ->next ->..finish.













17.   Go to Basic ->Inquiries ->batch job ->check two things are created.

18.   Go to admin -> setup -> server configuration ->Overview check whether  checkbox selected or not.(if not select->then select otherwise work flow will not work). In batch server groups ->two groups automatically displayed.