web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Get SSRS Report Parameter Value from Form Selected Grid

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans