preloader-matrix

Alfasith

How to add ranges in SSRS in design level

Hi,

In the Tablix property of the grid we add the filter in any rages.

NOTE:

1. All the operator are common and except  < > . This < > for != Not equals to ranges.

2. We cant add multiple ranges of same filed in same expression values whereas we need to create n number of filters against the expression to add ranges accordingly.

3. Working on Row visibiliy expression is not recomended to achiew this ranges.

4. To have AND condition in the value needs to add between Value1 and Value2

Regards,

Alternative row colors with different scope in SSRS

 Hi,

Alternative colors without any scope or condiction.

=iif(RowNumber(Nothing) Mod 2, “#ffffff”, “#f0f0f0”) 

Alternative colors with scope or condiction.

=IIF(RunningValue(Fields!CustId.Value, CountDistinct, Nothing) MOD 2 = 1, “#ffffff”, “#f0f0f0”) 

We can display alternative colors based on distinct running values or by parent groups or specific condition like

=IIF(Fields!Amount.Value > 35000 , “#ffffff”, “#f0f0f0”) 

Even we can achive group with in group cases and Matrix cases by selecting particular cells.

Regards

The SQL server reporting Service service is running -SSRS 2012

Solution for this error:  The deployment was cancelled because of an error: On the reporting server, |Verify that The SQL server reporting Service service is running Solution: 1. Check Local business connector is optimum/ correct.2. Check Domain business connector is optimum/ correct.3. Put increment CILNow deploy it will be deployed.Regards,

Job to save the SSRS in PDF at given location in Dynamic AX

Hi,static void SaveSSRSasPdfCode(Args _args){     SrsReportRun srsReportRun;     srsReportRun = new SrsReportRun(“ReportName.PrecisionDesign1”);     srsReportRun.init();    srsReportRun.reportCaption(“ReportName.PrecisionDesign1”);    //Parameter to be passed    srsReportRun.reportParameter(“TableNameused”).value(“Parameter”);    srsReportRun.showDialog(false);     // Print to a file as ur name and location in HTML/PDF format.    srsReportRun.printDestinationSettings().printMediumType(SRSPrintMediumType::File);    srsReportRun.printDestinationSettings().fileFormat(SRSReportFileFormat::PDF);    srsReportRun.printDestinationSettings().overwriteFile(true);    srsReportRun.printDestinationSettings().fileName(@”C:UrReportName.pdf”);     if( srsReportRun )  […]

Job to run reports without knowing the used class names in Dynamic AX

static void PrintSSRSthroughCode(Args _args){    SrsReportRun srsReportRun;    srsReportRun = new SrsReportRun (“ReportName.PrecisionDesign1”);    srsReportRun.init();    srsReportRun.reportCaption(“ReportName.PrecisionDesign1”);    // set parameters    srsReportRun.reportParameter(“TableName”).value(“Parameter”);    // Dialog for failure (if)    srsReportRun.showDialog(false);    if( srsReportRun )    {             srsReportRun.executeReport();    }}

Validate the contract class or SSRS parameter from code level before printing

Just add below code in contract class so that mandatory  fields like date fields can be validated by throwing the warning.public boolean validate(){    boolean             isValid = true;    if (!fromDate)    {        isValid = checkFailed(“From Date should be entered”);    }    if (!toDate)    […]

Tablix headers not repeating in SSRS

Hi,To repeat tablix header through out the ssrs (all pages)1. In the grouping pane, make sure to turn on advanced mode (click on the small black down arrow on the far right of the grouping pane) 2. Select the corresponding (Static) item in the row group hierarchy3. In the properties grid, set RepeatOnNewPage to true4. […]

Job to run the DP class in Dynamic AX

static void Job2runDP(Args _args){     TenantBalanceDetailsTmpTbl TenantBalanceDetailsTmpTbl; //temp table name    Query q;    TenantBalanceBuildingLevRDP dataProvider = new TenantBalanceBuildingLevRDP();//DP class name    TenantBalanceBuildingLevContract contract = new TenantBalanceBuildingLevContract();//contract class name    contract.parmNetBuildingId(‘CEU-000022’);//parameter that you passing in contract class    q = dataProvider.parmQuery();    dataProvider.parmDataContract(contract);    dataProvider.processReport();    TenantBalanceDetailsTmpTbl = dataProvider.getTenantBalanceDetailsTmpTbl();    while select TenantBalanceDetailsTmpTbl group […]

Company image in SSRS 2012

1. Create a field as Companyimg in the temp table2. In the properties of that field select the extended datatypes as “Bitmap”. use the below code to insertTmpTbl.Comapanyimg = CompanyImage::findByRecord(CompanyInfo::find()).Image;3. In Visual studio  right click insert image .a. Source : databaseb. field select the companyimgc. as bitmap format in format selection

Alternative color in SSRS 2012

Write in the expression in SSRS=iif(RowNumber(Nothing) Mod 2, “White”, “WhiteSmoke”) or use =IIF(RunningValue(Fields!BuildingId.Value,COUNTDISTINCT,NOTHING) MOD 2 = 0,”WhiteSmoke”,”White”) //Here BuildingId is the group by value to have alternative color for every group.

Complete company name as expression in SSRS 2012

Expression in SSRS =Microsoft.Dynamics.Framework.Reports.DataMethodUtility.PostDataMethodEvaluation(Microsoft.Dynamics.Framework.Reports.DataMethodUtility.UpdateAxContextPartition(Parameters!AX_CompanyName.Value, Parameters!AX_UserContext.Value, Parameters!AX_RenderingCulture.Value, Parameters!AX_PartitionKey.Value),Microsoft.Dynamics.Framework.Reports.DataMethodUtility.GetFullCompanyNameForUser(Parameters!AX_CompanyName.Value, Parameters!AX_UserContext.Value))

Debug the report in AX 2012

Hi static void AlfasithDpDebug(Args _args) {     NQ_smmActivitiesDP    NQ_smmActivitiesDP;    NQ_smmActivitiesDP   dataprovider = new NQ_smmActivitiesDP();    NQ_smmactivitiesContract contract = new NQ_smmactivitiesContract();    smmActivitiesTmp      smmActivitiesTmp;    query q;     contract.param_application(5637147580);    q = dataprovider.parmQuery();    //q.dataSourceTable(tableNum(SalesQuotationTable)).addRange(fieldNum(SalesQuotationTable, WorkerSalesResponsible)).value(“”); //000545″); //”000042″); //”DNG998877″);    q.dataSourceTable(tableNum(smmActivities)).addRange(fieldNum(smmActivities, responsibleworker)).value(“”); //000545″); //”000042″); //”DNG998877″);    dataprovider.parmDataContract(contract);    dataprovider.processReport();  […]

How to add multiple parameter in to SSRS report as Query range in Dynamic AX

Hi,Adding the fields in the Contract directly reflect on the parameter fields in the report dialog.Adding the QueryBuildRange and its datasource makes the querying of the ranges value. CategoryContractClass:[    DataContractAttribute,    SysOperationGroupAttribute(‘Case’, “Case”,’1′),    SysOperationGroupAttribute(‘Date’, “Date”,’2′),    SysOperationGroupAttribute(‘PrintOut’, “@SYS12608”, ‘3’) ]public class CategoryContract implements SysOperationValidatable{     FromDate   FromDate;    ToDate     […]

Cross row manipulation of SSRS reports 2012

Hi, Cross summation or manipulation in SSRS reports. Consider the below image has credits and debit, The Balance is calculated by  =Credit – Debit + Balance.  From my knowledge it is not possible in Visual Studio. Instead we can make this possible by below procedure. 1.Create a field in the temp table as balance. 2. In […]

Change company in Dynamics AX 2009

Hi,  In Microsoft Dynamics AX Axapta, sometimes, we can to insert/update/delete records in different companies or insert/update/delete according to the company we are…  In Dynamics AX, exists the “changeCompany” function, that allow us to do that easily. Here’s an example: static void main() {     CustTable custTable;     ;     //Assume that […]

Save the SSRS report as pdf or print it through code in Dynamic AX

Ax 2012 Reports (SSRS) Print UtilitiesThis article gives the examples, to print the reports of Dynamics Ax 2012 (SSRS Reports), in different ways.1)Sending the Ax report through mail.2)Save the report as file in local computer. (example covered to save the report as .pdf file)Mail the reportstatic void myJobPrintReportMail(Args _args){SrsReportRun             […]

UI Builder class in Dynamic AX

UI Builder class Today i will share how to give a filter lookup using an UI Builder class.                                                                             […]

RDP Class in Dynamic AX

Style 1. [SRSReportQueryAttribute (querystr(CustTableQry)),SRSReportParameterAttribute(classstr(CustContractClass))]class CustTableRDP extends SRSReportDataProviderBase{CustTableTmp custTableTmp;}*********************************[SysEntryPointAttribute(false)]public void processReport(){QueryRun             queryRun;Query                query;CustTable            custTable;CustContractClass    CustContractClass;AccountNum           accountNum;QueryBuildDataSource queryBuildDataSource;QueryBuildRange     queryBuildRange;query = this.parmQuery();   CustContractClass = this.parmDataContract() as CustContractClass;accountNum = CustContractClass.parmAccountNum();// Add parameters to […]