As i understand you, you are trying to generate a birt report form a servlet where you have the *.rptdesign in somewhere location.
Good, look at the following code
this.bundle = ResourceBundle.getBundle("com.tts.mersal.resources.MersalResources");
this.config = new EngineConfig();
this.config.setEngineHome(bundle.getString("BIRT_ENGINE_HOME"));
this.config.setLogConfig(bundle.getString("BIRT_LOGGING_FOLDER_PATH"), Level.ALL);
Platform.startup(config);
this.factory = (IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
this.engine = factory.createReportEngine( config );
this.engine.changeLogLevel(Level.ALL);
ContentReader contentReader = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getFileFolderService().getReader(MersalOutboundReportDialogBean.this.dialogReportNode.getNodeRef());
IReportRunnable report = MersalOutboundReportDialogBean.this.getEngine().openReportDesign(contentReader.getContentInputStream());
ReportDesignHandle designHandle = (ReportDesignHandle)report.getDesignHandle();
OdaDataSource source = (OdaDataSource)designHandle.getModule().findDataSource(DATA_SOURCE_NAME);
source.setProperty(source.getPropertyDefn("FILELIST"), buildUrl((String)source.getProperty(designHandle.getModule(), "FILELIST")));
IRunAndRenderTask runAndRenderTask = MersalOutboundReportDialogBean.this.getEngine().createRunAndRenderTask(report);
HTMLRenderOption render = new HTMLRenderOption();
render.setOutputFileName("G:/Render.html");
render.setOutputFormat("html");
runAndRenderTask.setRenderOption(render);
runAndRenderTask.run();
runAndRenderTask.close();
As you can see the first thing you must prepare the birt engine and then get an instance of report from type IReportRunnable, so you can after that set the location of the output by using therender option which will be changed based on your request.
You have multiple chocies, HTMLRenderOption, PDFRenderOption and others.
I hope that will serve you.
Thanks.