Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Get SSRS Report Parameter Value from Form Selected Grid

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Experts,

I am facing problem about getting values from form selected grid to SSRS report parameter dialog

Here is some Ref what i need

MyForm:

6371.form.png

In this above image i have selected one field name dhrumesh , I need that when i click on result menu button from above my selected field dhrumesh should come in the ssrs form parameter as below image

2161.report.png

But I am getting the other value . Below is my code of all the three classes i have developer

DP Class(Data Provider):

Process Report:

[SysEntryPointAttribute]
public void processReport()
{
Query query;
QueryRun queryRun;
QueryBuildDataSource queryDS;
QueryBuildRange queryRange;
KR_StudentDetail sdTable;
KR_StudentResultReportContract contract ;
ListIterator studentListIterator;

tempTable.clear();
contract = this.parmDataContract() as KR_StudentResultReportContract;
query = new Query(queryStr(KR_StudentResultView));
studentListIterator = new ListIterator(contract.parmStudentIDList());
queryDS = query.dataSourceTable(tableNum(KR_StudentDetail));

while(studentListIterator.more()){
queryRange = query.dataSourceNo(1).addRange(
fieldNum(KR_StudentDetail,ID));
queryRange.value(studentListIterator.value());
studentListIterator.next();
}
queryRun = new QueryRun(query);
while(queryRun.next()){
sdTable =queryRun.get(tableNum(KR_StudentDetail));
this.insertIntoTempTable(sdTable.ID,contract.parmSemester());
}
}

Controller PrePromptModify:

protected void prePromptModifyContract()
{

str test;
Query query;
KR_StudentDetail StudentDetail;
KR_StudentResultReportContract contract;
FormDataSource fds;
container con;
int i;
List list=new list(Types::String);
SrsReportHelper::addParameterValueRangeToQuery(this.getFirstQuery(),tableNum(KR_StudentDetail),fieldNum(KR_StudentDetail, Name),SysQuery::value(this.parmArgs().record().RecId));
contract = this.parmReportContract()
.parmRdpContract() as KR_StudentResultReportContract;
StudentDetail = Args.record();
fds = Args.record().dataSource();
contract.parmStudId(StudentDetail.Name);
if(this.parmArgs() && this.parmArgs().parm()){
contract = this.parmReportContract()
.parmRdpContract() as KR_StudentResultReportContract;
test = this.parmArgs().parm();
con = str2con(test,",");

contract.parmSemester(conPeek(con,1));
for(i=2;i<=conLen(con);i++){
list.addEnd(conPeek(con,i));
}
contract.parmStudentIDList(list);
}

//txt1 = this.parmArgs().record();
//contract = new KR_StudentResultReportContract();
//contract.parmStudId(txt1.ID);
//this.parmReportContract().parmRdpContract(contract);
}

Has anyone have solution for this?
I am using UIBuilder in the report.

I am very grateful if any of you can help my problem .

Thanks and Regards

Krutish Ruparelia

 

 

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans