1. when user want to print the report, user can click "Print Report" button. then window pop up will show, user must choose print format in PDF or HTML.
is it possible we do not show this Pop up window, and directly print with html format or PDF format?

2. when we choose print with HTML format, then pop up window will show with html report inside, can we close this window after printing the report? or can we do not show this HTML report window when we print?

3. Actually i use ASP.NET and using BIRT as the report application to show my report.
ussually when i generate report with Crystal Report, i send Datatable object as the source of the report, now in BIRT i convert the datatable to XML and use this temporary XML file as the source of the report. is it possible to delete this XML file after the report is generated? if possible, can u tell me how to do that?

1 - You can change the javascript functions that are used in the viewer
to make the Dialog automatically submit, which will launch the windows
print dialog. Look in the webcontent\birt\ajax\ui\dialog direcotry and
open the BirtPrintReportDialog.js file. Call the okPres in the preShow
function as shown below.

On 10/18/2011 12:54 AM, cbr125x wrote:
> i have 2 questions, hopefully u can help me.
>
> 1. when user want to print the report, user can click "Print Report"
> button. then window pop up will show, user must choose print format in
> PDF or HTML.
> is it possible we do not show this Pop up window, and directly print
> with html format or PDF format?
> 2. when we choose print with HTML format, then pop up window will show
> with html report inside, can we close this window after printing the
> report? or can we do not show this HTML report window when we print?
>
> 3. Actually i use ASP.NET and using BIRT as the report application to
> show my report.
> ussually when i generate report with Crystal Report, i send Datatable
> object as the source of the report, now in BIRT i convert the datatable
> to XML and use this temporary XML file as the source of the report. is
> it possible to delete this XML file after the report is generated? if
> possible, can u tell me how to do that?
>
> Many thanks for u BIRT Expert..

3. i got error to in line :
f.delete();
error message : missing name after. operator

can u suggest me the solution?
Thx

Jason Weathersby wrote on Tue, 18 October 2011 12:12

1 - You can change the javascript functions that are used in the viewer
to make the Dialog automatically submit, which will launch the windows
print dialog. Look in the webcontent\birt\ajax\ui\dialog direcotry and
open the BirtPrintReportDialog.js file. Call the okPres in the preShow
function as shown below.

On 10/18/2011 12:54 AM, cbr125x wrote:
> i have 2 questions, hopefully u can help me.
>
> 1. when user want to print the report, user can click "Print Report"
> button. then window pop up will show, user must choose print format in
> PDF or HTML.
> is it possible we do not show this Pop up window, and directly print
> with html format or PDF format?
> 2. when we choose print with HTML format, then pop up window will show
> with html report inside, can we close this window after printing the
> report? or can we do not show this HTML report window when we print?
>
> 3. Actually i use ASP.NET and using BIRT as the report application to
> show my report.
> ussually when i generate report with Crystal Report, i send Datatable
> object as the source of the report, now in BIRT i convert the datatable
> to XML and use this temporary XML file as the source of the report. is
> it possible to delete this XML file after the report is generated? if
> possible, can u tell me how to do that?
>
> Many thanks for u BIRT Expert..

What version are you using? I tried this with 3.7 and did not get any
error.

The file.delete seems to have an issue conflicting with the JavaScript
delete operator. You will either have to implement your delete
operation in a Java Event Handler or just write a class that deletes the
file and add it to the birt classpath and call it from your script.

I alert this.zIndexStack.length, the result is 0
I alert this.zIndexCurrent, the result is undefined.

For Java event handlers, I don't quite understand.
but i'll try to learn it first

Thanks

Jason Weathersby wrote on Wed, 19 October 2011 10:34

What version are you using? I tried this with 3.7 and did not get any
error.

The file.delete seems to have an issue conflicting with the JavaScript
delete operator. You will either have to implement your delete
operation in a Java Event Handler or just write a class that deletes the
file and add it to the birt classpath and call it from your script.

Hi Jason,
when I run the report in Eclipse, it got no error,
but when i run in tomcat with BIRT Viewer, i got error "birtEventDispatcher is undefined".
actually what you suggest is true, but i want the window print only show when user click the print button.
Thx, sorry for disturbing you again.

Jason Weathersby wrote on Thu, 20 October 2011 11:23

Instead of modifying the viewer can you add a text element to the report
and set its type to html and enter the following: