|
iReport new dataset
|
|||
---|---|---|---|
#18+
Здравствуйте. Не могу понять каким образом работает датасет. Как я понял можно задавать датасету иной сквл запрос отличающийся от основного отчета. соответственно в новом датасете свои поля со своими данными. у меня такая ситуация: создал новый датасет с запросом отличающийся от соновного отчета(поля запроса у них одинаковые. разные только условия выборки в сквл запросе), но после подстановки полей с датасета в основной отчет значение полей основного отчета и значение поля с датасета совпадают(значение поля с датасета принимает значение с основоного отчета) каша какая то..но все равно кто что знает))) ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2012, 17:14 |
|
iReport new dataset
|
|||
---|---|---|---|
#18+
или датасет используют только для чартов и графиков?! ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2012, 17:19 |
|
iReport new dataset
|
|||
---|---|---|---|
#18+
rail13, Лично я использовал Dataset только для Table. В этом случае фактически поля Dataset являются полями основного отчета. То что они у вас получаются одинаковыми это мне кажется нормально. Так как смысл таблицы - вывести данные основного отчета. А вот форматирование (отображение/подавление столбцов, группировки, ...) фактически строится над элементами Dataset таблицы. Там внутри таблицы чуть свои правила игры. Некоторые вещи геморрные, но можно добиться красивого вывода. Я рисовал в iReport чарты, но Dataset не использовал, он там вроде не нужен ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2012, 18:46 |
|
iReport new dataset
|
|||
---|---|---|---|
#18+
sanBez, спасибо за ответ. ... |
|||
:
Нравится:
Не нравится:
|
|||
15.06.2012, 15:57 |
|
iReport new dataset
|
|||
---|---|---|---|
#18+
результат запрос внутри датасета выводим листом, а как проверить вне листа пуст ли лист? ... |
|||
:
Нравится:
Не нравится:
|
|||
12.10.2012, 15:00 |
|
iReport new dataset
|
|||
---|---|---|---|
#18+
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" ... |
|||
:
Нравится:
Не нравится:
|
|||
12.10.2012, 16:32 |
|
iReport new dataset
|
|||
---|---|---|---|
#18+
А кстати, кто-нибудь может сказать, что можно сделать через 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. ... |
|||
:
Нравится:
Не нравится:
|
|||
12.10.2012, 16:55 |
|
|
start [/forum/topic.php?fid=31&fpage=38&tid=1534248]: |
0ms |
get settings: |
10ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
30ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
43ms |
get tp. blocked users: |
1ms |
others: | 269ms |
total: | 389ms |
0 / 0 |