Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Sunday, May 8, 2016

Change design of Document report

I had to change the design of PO report today and I followed the usual way of mentioning my design in the controller class.
But then realized that it's not working and found that I need to make a change of design from the "FormLetterReport" class.

There is a method named "loadPrintSettings" where you can mention the design change for these document report like PO, GRN etc.

Saturday, February 6, 2016

Hide parameters in Report dialog Ax2012

There are different ways to do it. Some of them are:



Method 1:

Why the default ranges will come in Dialog?:

Because in the Query used it will show the index fields of the Table, so to hide the Default ranges you have to overload the showQueryValues() in the Controller class: return FALSE.

Credit: http://axdevhelper.blogspot.com/2012/09/how-to-hide-default-query-parameters-in.html


Method 2:

The View group fields comes from InventDimViewContract class which is added as a parm method in ProdPickListContract class to show the options for all inventory dimensions.

Suppose, we want to hide all the parameter groups from report dialog and just want to display the dynamics filters on the report. You need to modify the UIBuilder class of your report. For production picking list report, the UI Builder class is ProdPickListUIBuilder. The build method needs to be modified and the code in Bold below can be used to hide the whole parameter group from SSRS report dialog:

public void build()
{
FormBuildGroupControl grp;
grp = this.dialog().curFormGroup();
grp.frameType();
grp.columns(2);

if (this.controller().parmArgs().menuitemName() == #yourMenuItemName)
{
grp.visible(false);
}
super ();
}

To hide the dynamic filters from SSRS report dialog based on caller menu item, you need to override the following method in your controller class and return false from this method based on your condition:

showQueryValues

Override this method in your controller class and write the following code:

public boolean showQueryValues(str parameterName)
{
If (this.parmArgs().menuItemName() == menuItemOutputStr(#YourMenuItemName)
{
return false;
}
else
{
return true;
}
}

Credits: https://syedbaber.wordpress.com/2015/07/23/hiding-parameter-groups-or-dynamics-filters-on-ssrs-report-dialog-at-runtime/

Method 3:
If you use a report controler class, you can overwrite the showQuerySelectButton method and return false.


Method 4 :
If you remove the ranges from the modeled query, and add them back programmatically in the methods of the query, they also will not show up as parameters for the report.


Method 5:

contract parameters are can definately be hidden . Look at any report that uses srstmpTableMarshaller class (Pseudo tmp table report's ). or any document reports . Journal record id is generally passed from controller --> Design (via parameter value in contract class) -- >DP class.


But still it's not visible on the report. All you need to is set its property to hidden in VS.
I feel its more like issue with the usage data.
Once you set the property to hidden you need delete the report from report manager and then redeploy, remove usage data, delete records in SYSLastValue, SRSReportQuery restart Reporting services.

Method 6:

Allow dynamic filtering false and remove the dynamic parameter. redeploy the report and refresh the user cache.


Method 7:

You can also use a not defined group.
SysOperationGroupMemberAttribute(‘group_notdefined_at_classdeclaration’)

The group ‘group_notdefined….’ will not be shown on the dialog, so all its members are
invisible.

Credits: https://community.dynamics.com/ax/f/33/t/83017

https://community.dynamics.com/ax/f/33/p/155614/364546#364546


Now one of them would surely help :)

Friday, January 22, 2016

SSRS performance improvement

With one of our clients, we were facing this issue of reports loading really slow. Even the simple document reports were taking 2-3minutes to display data. So finally the solution came out that we need to increase the recycle time of the SSRS.

That's how to do this:
Navigate to "C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer" (depending on the SSRS version).

Look for file RSReportServer.config and open it.

Now find the tag "RecycleTime" from the default "720" to "1440". You can try increasing the value further depending on the performance.


Hope this helps. :)

Monday, September 21, 2015

Publish-AxReport parameters

Publish-AXReport

Deploys reports from Microsoft Dynamics AX to a Microsoft SQL Server Reporting Services instance.

Syntax

Parameter Set: Default
Publish-AXReport -Id <String> [-ModifiedAfter <DateTime> ] [-ReportName <String> ] [-RestartReportServer] [-ServicesAOSName <String> ] [-ServicesAOSWSDLPort <Int32> ] [-ServicesFilePath <String> ] [-SkipDeletingExistingReport] [-SkipReportServerAdminCheck] [ <CommonParameters>]

Detailed description

The Publish-AXReport cmdlet deploys reports from Microsoft Dynamics AX to a Reporting Services instance. By default, previously deployed report metadata is deleted and replaced when reports are deployed.

Parameters

-Id<String>

Specifies the identifier of the configuration to use to connect Microsoft Dynamics AX and Reporting Services.

Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ModifiedAfter<DateTime>

Limits the reports to be deployed to those modified after a specified date. Use the date format specified by your operating system. If you do not know the format, you can run the Get-AXReport cmdlet to see the format of ChangedDate.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ReportName<String>

Specifies the names of the reports to be deployed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-RestartReportServer

Forces the Reporting Services service to restart after a report is deployed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesAOSName<String>

Specifies the name of a Microsoft Dynamics AX Application Object Server (AOS) instance to connect to instead of the default value.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesAOSWSDLPort<Int32>

Specifies the web service (WSDL) port of an AOS instance to connect to instead of the default value.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-ServicesFilePath<String>

Specifies a client configuration parameter file (.axc) to use instead of the configuration that is stored in the registry.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-SkipDeletingExistingReport

Specifies that the cmdlet should not delete existing report design metadata when executed.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

-SkipReportServerAdminCheck

Specifies that the cmdlet should be executed without checking whether the user has administrator rights on Reporting Services.

Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see about_CommonParameters http://go.microsoft.com/fwlink/?LinkID=113216

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.
  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.
  • None

    The cmdlet does not generate any output.

Examples

This example publishes reports whose names start with CustomReports and that were modified after October 10, 2011 to the report server configuration ReportServer01, and then forces the server to restart.

C:\PS>Publish-AXReport -Id ReportServer01 -ModifiedAfter 2011-10-10 -ReportName CustomReports* -RestartReportServer

Source: https://msdn.microsoft.com/en-us/library/jj720262.aspx



Deploy report to a specific AOS instance

Publish-AXReport –ReportName * -id AXSSRS –servicesAOSname AXServer –servicesAOSWSDLPort 8101

Here AXSSRS is the SSRS configurationID name and AXServer is the system name not AOS name.