| Quintiq file version 2.0 | 
| #parent: Toolbar/btnPrint | 
| Response OnClick () id:Response_Toolbar_btnPrint_OnClick | 
| { | 
|   #keys: '[100708.0.582187766]' | 
|   Body: | 
|   [* | 
|     // Generate report | 
|     reportname := StringSelectionReportsList.Text(); | 
|     background := CheckBoxBackground.Checked(); | 
|      | 
|     format := BirtRenderFormat::Html(); | 
|      | 
|     if ( StringSelectionReportFormat.BoundValue() = "PDF" ) | 
|     { | 
|       format := BirtRenderFormat::Pdf(); | 
|     } | 
|     else if( StringSelectionReportFormat.BoundValue() = "DOC" ) | 
|     { | 
|       format := BirtRenderFormat::Doc(); | 
|     } | 
|     else if( StringSelectionReportFormat.BoundValue() = "XLS" ) | 
|     { | 
|       format := BirtRenderFormat::Xls(); | 
|     } | 
|     else if( StringSelectionReportFormat.BoundValue() = "PPT" ) | 
|     { | 
|       format := BirtRenderFormat::Ppt(); | 
|     } | 
|      | 
|     Dialog.EndModal(1); | 
|      | 
|     if ( reportname.Length() > 0 ) | 
|     { | 
|      | 
|       options := ApplicationLibMacroPlanner.CreateBirtGenerateOptions(); | 
|      | 
|       if ( background ) | 
|       { | 
|         ApplicationLibMacroPlanner.GenerateAndRenderReport( reportname,  format, options ); | 
|       } | 
|       else | 
|       { | 
|         ApplicationLibMacroPlanner.ReportManager().PreviewBirtReport( reportname, options ); | 
|       } | 
|     } | 
|   *] | 
|   DefinitionID: 'Responsedef_GUIButtonBase_OnClick' | 
|   Precondition: | 
|   [* | 
|     StringSelectionReportsList.Text().Length() > 0 | 
|   *] | 
| } |