powered by simpleCommunicator - 2.0.39     © 2025 Programmizd 02
Форумы / Отчетные системы [игнор отключен] [закрыт для гостей] / iReport new dataset
7 сообщений из 7, страница 1 из 1
iReport new dataset
    #37838290
rail13
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Здравствуйте. Не могу понять каким образом работает датасет. Как я понял можно задавать датасету иной сквл запрос отличающийся от основного отчета. соответственно в новом датасете свои поля со своими данными.
у меня такая ситуация: создал новый датасет с запросом отличающийся от соновного отчета(поля запроса у них одинаковые. разные только условия выборки в сквл запросе), но после подстановки полей с датасета в основной отчет значение полей основного отчета и значение поля с датасета совпадают(значение поля с датасета принимает значение с основоного отчета)
каша какая то..но все равно кто что знает)))
...
Рейтинг: 0 / 0
iReport new dataset
    #37838298
rail13
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
или датасет используют только для чартов и графиков?!
...
Рейтинг: 0 / 0
iReport new dataset
    #37838450
sanBez
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
rail13,

Лично я использовал Dataset только для Table. В этом случае фактически поля Dataset являются полями основного отчета.
То что они у вас получаются одинаковыми это мне кажется нормально.
Так как смысл таблицы - вывести данные основного отчета.
А вот форматирование (отображение/подавление столбцов, группировки, ...) фактически строится над элементами Dataset таблицы.
Там внутри таблицы чуть свои правила игры. Некоторые вещи геморрные, но можно добиться красивого вывода.

Я рисовал в iReport чарты, но Dataset не использовал, он там вроде не нужен
...
Рейтинг: 0 / 0
iReport new dataset
    #37839874
rail13
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
sanBez, спасибо за ответ.
...
Рейтинг: 0 / 0
iReport new dataset
    #37995751
davy johns
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
результат запрос внутри датасета выводим листом, а как проверить вне листа пуст ли лист?
...
Рейтинг: 0 / 0
iReport new dataset
    #37996009
sanBez
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
davy johns,

А доку почитать? Смотри второй абзац

Since C and variable1 must be considered at different evaluation times, the evaluation time of the textfield showing this
result must be set to Auto. Here we have the first major limitation of the List component, which is that it cannot use the
evaluation time Auto. As a result, to print this percentage we need to use a subreport or precalculate the final value of
variable1.
Another limitation of the List component is the lack of support for return values. Unlike subreports, there is not a simple way
to return a value calculated in the List to the master report. However, this limitation can be overcome by using a scriptlet or
Java code by sharing a hash map between the main dataset and the List component dataset.
Figure 13-8 List st with cumulative sum and evaluation time variables
iReport Ultimate Guide
222
As we said, the List has no evaluation time or, to say it better, the evaluation time of a List component is always “now.” This
is in general not a problem, since the List does not use the main dataset to collect the data to print, but it can be a limitation if
we want to print, in the List, data coming from an elaboration of the main dataset. For example, we may want to use a scriptlet
to collect data to print, in the list processing, each record of the main dataset, like a table of contents and index, or information
for which the data is collected during the report execution. The problem can be partially overcome by placing the List in a
portion of the report that is reached only when the elaboration has been finished (for example, in the summary band).
Finally, a List has no header or footer. While it is trivial to add static text on top of the List element, creating the effect of a
table header, the lack of a summary prevents you from printing totals or other calculation results at the top or bottom of the
List. This problem may be overcome by applying the approaches to return values from the List.


Ни разу не пользовался subDataSet, сейчас сваял для пробы отчетик элементарный. В общем как я понимаю - это очень сильно урезанный вариант сабрепортов. Да ну их нафиг.

Если хочется удалить пустые строки, где у листа нет записей, на лист можно поставить "Remove line when blank"
...
Рейтинг: 0 / 0
iReport new dataset
    #37996056
sanBez
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
А кстати, кто-нибудь может сказать, что можно сделать через subDataSet (или List) такое, что невозможно сабрепортом?
Я пока в них вообще смысла не вижу. Может я что-то пропустил интересное?

Опять же из доки:
The List component has been introduced in JasperReports 3.5.2 and is supported by iReport 3.5.2 and later versions. It is
basically a kind of light subreport which does not require any external report, but it is entirely defined inside the report in
which it resides. In spite of the name, which can lead you to think it is a simple list of items, the component is quite powerful,
allowing an item of the list to be defined using several elements including textfield, images, and graphic objects. The typical
use case is the presentation of a list of values or the creation of small tables that do not require calculations. The data used to
fill the list is acquired using a subdataset, so a list cannot work using the main dataset.
...
Рейтинг: 0 / 0
7 сообщений из 7, страница 1 из 1
Форумы / Отчетные системы [игнор отключен] [закрыт для гостей] / iReport new dataset
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]