AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.10.2012, 19:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
ax-erp: How to Set the Query Range on a SSRS Report
Источник: http://microsoft-dynamics-ax-erp.blo...rs-report.html
==============


If the SSRS report is build with AOT query
SRSReportRun reportRun = new SRSReportRun(‘Report1.AutoDesign1′);
// Create variables for setting the range for the query.
Query query;
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
int i;
// Check if the query will return data.
if (reportRun.init())
{
// Find the Cust query.
query = reportRun.reportQuery(‘Cust’); // query name of the report
if (query != null)
{
// Get the Customers data source.
queryBuildDataSource = query.dataSourceName(‘Customers’);
if (queryBuildDataSource != null)
{
queryBuildRange = queryBuildDataSource.addRange(fieldName2Id(queryBuildDataSource.table(), ‘AccountNum’));
queryBuildRange.value(’4000′);
}
}
// Save the report settings.
reportRun.saveSettings();
// Run the report.
reportRun.run();
}
If the report is build with Data contract
Here is an example which comes from the AOT – Classes – CustPamnManOutputReportController – preRunModifyContract method:
protected void preRunModifyContract()
{
Query reportQuery;
SrsReportRdlDataContract rdlContract;
rdlContract = this.parmReportContract().parmRdlContract(); // may be some changes require here if the report is running from some job.
if (rdlContract.getValue(#reportParameter))
{
custPaymManFile.reportDate(systemdateget());
custPaymManFile.status(PaymManRemittanceStatus::Sent);
}
this.processReport(custPaymManFile);
reportQuery = new Query(querystr(CustPaymManOutputReport));
SRSReportHelper::addParameterValueRangeToQuery(
reportQuery,
tablenum(TmpPaymManOutputReport),
fieldnum(TmpPaymManOutputReport, SessionId),
this.currentSessionId());
this.parmReportContract().parmQueryContracts().insert(queryKey, reportQuery);
}



Источник: http://microsoft-dynamics-ax-erp.blo...rs-report.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
ax-erp: Walkthrough: Creating a Report Bound to a Report Data Provider Class (X++ Business Logic) [AX 2012] Blog bot DAX Blogs 0 20.09.2012 11:11
ax-erp: Creating SSRS-Reports in Dynamics AX 2012 – What’s no longer possible in AX-reports Blog bot DAX Blogs 0 18.07.2012 12:11
msdax: How to Specify Range Values on a Query in a AX SSRS Report - AX Support - Site Home - MSDN Blogs Blog bot DAX Blogs 0 31.03.2011 11:11
saveenr: Dynamics AX 2012: A Preview of SSRS Report Development (Part 1) Blog bot DAX Blogs 0 06.02.2011 00:11
emeadaxsupport: Visual Studio Dynamics AX report development how to associate X++ class with report dataSet Blog bot DAX Blogs 0 13.01.2010 23:08
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:02.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.