PDA

View Full Version : Add some new attributes to element?



Anonymous
09-18-2002, 11:42 PM
Hi,Thomas and all,
I think some new attributes can be added to the <report> element.
As bellow Lists:
1.password_needed:
This attribute defines whether the report is password-needed.
If it is "true",then when one person wants to view the report ,the
pdf viewer will pop up an alert window for entering the password.
2.password.
If the report is password-needed.This attribute will define what
the password is.
3.Allow_print
Defines if the report is allowed to be printed in a pdf viewer.
4.Allow_copy
Defines if the report is allowed to be copied some of its words in a pdf viewer.
5.Allow_edit
Defines if the report is allowed to be edited with a pdf editor.

All those attributes are supported by iText package.So, I think it maybe
also can be implemented on JfreeReport.What's your opinion?

Regards,
tsingt

Anonymous
09-19-2002, 06:39 AM
Hi,

have a look at the PDFSave Dialog, this dialog has all your whishes implemented, you just have to set some properties on the OutputTarget to achive this behaviour. But these properties are very specific to the PDFOutputTarget, so they should not be part of the ReportDefinition itself.

But it is a good idea to spupply default properties for the various OutputTargets, maybe that way:

<report ... >
<outputtarget-def class="com.jrefinery.report.target.PDFOutputTarget">
<property name="password"> ... </property>
...
</outputtarget-def>
...

</report>

This is similar as your approach, but not bound to a specific OutputTarget-implementation. So changes in the OutputTarget implementation won't need a change of the DTD or even the parser.

Have more fun,
said Thomas

Anonymous
09-19-2002, 09:07 PM
Hi,
Thanks.
Then when can I use these properties ?
:)
Another question:
Suppose I build a pdf report based on a dataTable A,which
is a database table.while now, I want to insert a String-field
in the GroupHeader,the string-field is not from dataTable A,
but from Table B,another table of the database.For instance,
the string-field's value is Dsum("Table B","Field c","criteria"),
the criteria of the function is not a static value,but a dynamic
one.For example,the criterial is:field d(table B)=the value of
the group field(Table A) .
How can I build the report?Could I build my function to meet
the demand?How to built my function?

Thanks.I hope I've expressed my question clearly(my poor english):).

Regards,
tsingt

Anonymous
09-19-2002, 09:07 PM
Hi,
Thanks.
Then when can I use these properties ?
:)
Another question:
Suppose I build a pdf report based on a dataTable A,which
is a database table.while now, I want to insert a String-field
in the GroupHeader,the string-field is not from dataTable A,
but from Table B,another table of the database.For instance,
the string-field's value is Dsum("Table B","Field c","criteria"),
the criteria of the function is not a static value,but a dynamic
one.For example,the criterial is:field d(table B)=the value of
the group field(Table A) .
How can I build the report?Could I build my function to meet
the demand?How to built my function?

Thanks.I hope I've expressed my question clearly(my poor english):).

Regards,
tsingt

Anonymous
09-20-2002, 09:47 AM
Hi,

these properties are part of the layouting stuff and they will surely need some time