My requirement is to get a vendor payment status.
1. create Custom Table:
2. Contract Class:
[DataContractAttribute]
internal final class DaxContractClass
{
TransDate Fromdate,Todate;
UserName userName;
[DataMemberAttribute('From date')]
public TransDate parmFromdate(TransDate _Fromdate= Fromdate)
{
Fromdate = _Fromdate;
return Fromdate;
}
[DataMemberAttribute('To date')]
public TransDate parmTodate(TransDate _Todate= Todate)
{
Todate = _Todate;
return Todate;
}
[DataMemberAttribute, SysOperationControlVisibilityAttribute(false)]
public str parmUserName(str _userName = userName)
{
userName = _userName;
return userName;
}
}
3.RDPClass:
[SRSReportParameterAttribute(classstr(DaxContractClass))]
internal final class DaxDpClass extends SRSReportDataProviderBase
{
DaxVendorPayments daxVendorpayements;
[SRSReportDataSetAttribute(tableStr(DaxVendorPayments))]
public DaxVendorPayments daxVendorpayements()
{
select * from daxVendorpayements;
return daxVendorpayements;
}
public void processReport()
{
TransDate fromdate,todate;
DaxContractClass contract;
LedgerJournalTrans LedgerJournalTrans;
LedgerJournalTable ledgerJournalTable;
contract = this.parmDataContract() as DaxContractClass;
while select* from LedgerJournalTrans join ledgerJournalTable
where LedgerJournalTrans.TransDate >= contract.parmFromdate()
&& LedgerJournalTrans.TransDate <= contract.parmTodate()
&& ledgerJournalTable.JournalNum ==LedgerJournalTrans.JournalNum
{
daxVendorpayements.JournalNum = LedgerJournalTrans.JournalNum;
daxVendorpayements.JournalName = ledgerJournalTable.JournalName;
daxVendorpayements.Voucher = LedgerJournalTrans.Voucher;
daxVendorpayements.TransDate = LedgerJournalTrans.TransDate;
daxVendorpayements.LedgerDimensionName = LedgerJournalTrans.LedgerDimensionName;
daxVendorpayements.AmountCurCredit = LedgerJournalTrans.AmountCurCredit;
daxVendorpayements.AmountCurDebit = LedgerJournalTrans.AmountCurDebit;
daxVendorpayements.CurrencyCode =LedgerJournalTrans.CurrencyCode;
daxVendorpayements.OffsetLedgerDimension=LedgerJournalTrans.OffsetLedgerDimension;
daxVendorpayements.OffsetAccountType = LedgerJournalTrans.OffsetAccountType;
daxVendorpayements.PaymentStatus =LedgerJournalTrans.PaymentStatus;
daxVendorpayements.Txt =LedgerJournalTrans.Txt;
daxVendorpayements.PaymMode =LedgerJournalTrans.PaymMode;
daxVendorpayements.CreatedBYY = XUserInfo::find(false, curUserId()).name;
// DaxVendorpayements.linkPhysicalTableInstance(daxVendorpayements);
daxVendorpayements.insert();
}
}
}
4.controller Class
class DAXControllerClass extends SrsReportRunController
{
public static void main(Args _args)
{
DaxContractClass contract;
contract.parmUserName(XUserInfo::find(false, curUserId()).name);
DAXControllerClass controller = new DAXControllerClass();
controller.parmReportName(ssrsReportStr(DaxVendorPayments,Report));
controller.parmArgs(_args);
controller.parmShowDialog(false);
controller.startOperation();
}
}
5. Create Report:
if we select all the fields in the query the selected fields will display in the design of the report
6. output menu item:-
7. Menuitem is placed in the account payable module
Input parameters:-
Output
-----------------------------------------------------------------------------------------------------------------------------
Report Method Calling Sequence:-
init
run
prompt
fetch
print
-----------------------------------------------------------------------------------------------------------------------------
Reports:-
Contract Class:-
validation :- implements SysOperationValidatable
[DataContractAttribute]
internal final class ContractClass
{
Transdate transdate;
[DatamemberAttribute]
public Transdate parmtransdate(Transdate _Transdate = transdate)
{
transdate = _Transdate;
return transdate;
}
}
RDPClass:-
[SRSreportParameterAttribute(classstr(ContractClass))]
class RDPClass extends srsreportdataproviderBase
{
//Initialize table
[SRSReportDatasetattribute(tablestr(table name))]
public tablename get tablename()
{
select * from tablename;
return tablename;
}
public void MainProcess()
{
// Main logic
}
}
Controller Class:-
extends ----> srsreportRunControllerclass
How to initialize default values in Sysoperation contract class parameters:
contract class must implement the class sysoperationIntializable
add the attribute [sysoperationAlwaysinitializeattribute] below the contract class.
you need to add a method named ‘initialize’ to the contract class.
[DataContractAttribute]
[SysOperationAlwaysInitializeAttribute]
class rsmTutSysOperationsContract implements SysOperationInitializable
{
private int retentionDays;
[DataMember,
SysOperationLabel(literalStr("Retention days")),
SysOperationHelpText(literalStr("Data older than the retention days will be cleaned up.")),
SysOperationDisplayOrder('1')]
public int parmRetentionDays(int _retentionDays = retentionDays)
{
retentionDays = _retentionDays;
return retentionDays;
}
public void initialize()
{
retentionDays = 30;
}
}
-----------------------------------------------------------------------------------------------------------------------------
Types of Reports :-
1. query based
2. RDP based
3. enum type
4. Matrix report
-------------------------------------------------------------------------------------------------------------------------
My requirement is to Open the report in en-us language even if is opened in any other language
The standard report is working based on the selected language.
The standard process:-
Report Open:-
inventory management > transfer order >print -transfer order
Language Setting:-
settings > user options >preferences
Report language Totally converted to Arabic.
Custom Process:-
Whatever language you have selected in the language level report opened only in English.
Controller Class:-
[ExtensionOf(classStr(InventTransferOrdOverviewController))]
internal final class DAXInventTrans_Extension
{
protected void prePromptModifyContract()ss
{
next prePromptModifyContract();
this.setRanges(this.parmReportContract().parmQueryContracts().lookup(this.getFirstQueryContractKey()));
this.parmReportContract().parmRdlContract().parmLabelLanguageId("en-us");
}
}
output:-
===========================================================================
my requirement is to get the tick mark symbol in the SSRS report:-
first, we have to change the text box properties:
* add font style to wingdings
after you can add the expression to the particular textbox:
=iif(Fields!DAXIdLabel.Value = "Yes", chr(252),chr(32))
wingdings:
-The preliminary study of the repertoire of four popular symbol sets:
- Wingdings ---SSRS
- Wingdings 2
- Wingdings 3
The symbols set are used by applications through their private encoding space or in Unicode Private Use Area
(U+F020-U+F0FF). This is not optimal for interchange, and it would be preferable to dedicate actual encoding
values for these symbols.
Hexa decimal code converted into decimal code:-tick mark() :-0xFC(HEXA) ------->252(decimal)
output:-
For any symbol you want to use referral this Blog:-