Calling a report from a report

Hi Has anyone outthere experienced with calling a report from another report? My problem is, that I have one report (Report1) which is running on one table. At certain records I want to have another document printed together with the document from Report1 - for that purpose I call Report2 on the OnAfterRecord() trigger in Report1. But there seems to be problems with that solution - the printerwindow moves in the background and locks the client?? Is there a better way to make this call? The solution should be so clever, that the user only has to think of printing Report1 (ie. mark all the records in a list, and choose ‘Print’). Heelp!! [?]

Did you try with temporary tables or/and CURRREPORT.SHOWOUTPUT I don’t understand why you need to have two separated reports.

Hi jensthomsen, i had the same problem about 1 year ago. there is not solution for the problem with hiding printerwindow into background. we included the report 2 in reort 1. br Josef

Jen, You could set the properties on the second report so it doesnt use a request form, however I believe this means it will only print and not preview the report. I’m not aware of a way which will run a report with no request form in preview mode. If you find a way please post it as I’d like to know. Alex

In Report based on Salesperson/Purchaser in the OnAfterGetRecord Trigger FromDate :=“Salesperson/Purchaser”.GETRANGEMIN(“Salesperson/Purchaser”.“Date Filter”); // use filter from rec ToDate :=“Salesperson/Purchaser”.GETRANGEMAX(“Salesperson/Purchaser”.“Date Filter”); // use filter from rec Customer2.RESET; Customer2.SETRANGE(Customer2.“Salesperson Code”,“Salesperson/Purchaser”.Code); Customer2.SETRANGE(“Date Filter” , FromDate, ToDate); // Run report 50085, no dialogue, on default printer, using Customer2 filters REPORT.RUNMODAL(50085,FALSE,TRUE,Customer2); Common way to generate that report selected from another table

If your worried about the printer window there is a property on the report called ShowPrintStatus. If you set this as false the window wont display at all.