thisform.loSession = xfrx("XFRX#LISTENER") thisform.loSession.SetParams(,,,,,,"XFF") thisform.loSession.DoNotOpenViewer = .t. thisform.loSession.SetThermFormCaption("Generating - "+thisform.Caption ) thisform.loSession.setEmbeddingType(2) REPORT FORM (thisform.form_prt) OBJECT thisform.loSession thisform.loXFF = thisform.loSession.oxfDocument LOCAL loSession loSession = xfrx("XFRX#INIT") SCAN WAIT WINDOW NOWAIT NOCLEAR lcExitTo + [ ]+ALLTRIM(Ime)+[ ] +ALLTRIM(Egn) && This is my method to get Page range for a group lcPageRange = thisform.loXFF.GetPageRangeForGroup(lcEgn+[: ]+Egn) lcFileName = "NameOfThePDF" loSession.SetParams(lcFileName,,,,,,"PDF") loSession.lNotOpenWord = .t. loSession.setPageRange(lcPageRange) loSession.setPermissions(.t., .f., .f., .t.) loSession.transformReport(thisform.loXFF) ENDSCANThe report look like the image I attached here.