Unable to create PDF report

Ask general questions here.
vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 12:55 pm

Hi,

I am trying to generate the PDF report using the below code of lines.

TestReport.SaveReport(); Report.Zip(TestReport.ReportEnvironment,ResultFolderPath+"\\ZipReport","Binding");

Ranorex.PDF.Creator.CreatePDF(ResultFolderPath+"\\ZipReport ,"C:\\Users\\ny102895\\Downloads\\PDFReport", "C:\\Users\\ny102895\\Downloads\\style\\style.xml", "PDFReport");

TestReport.EndTestCase();



I have the required DLL and giving the correct path of Zipped report(.rxzlog) but sill getting error

Exception Occured :System.Exception: Error: *.rxzlog not found.

Is there anyone has solution for this?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 1:42 pm

Hi,

Are you sure the rxzlog is actually available at given location? Have you checked the path stored in ResultFolderPath? What is the actual report path and rxzlog name?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Re: Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 1:53 pm

Yes , I have checked the report path and the Zipped report is available on the path. I tried giving the full path also instead of variable ResultfolderPath but the issue is same.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 1:58 pm

Are you running Ranorex/your test as administrator? Also, "ZipReport" is the actual report name? I'm not sure CreatePDF does work with filename without extension? Just rename the report to filename.rxzlog and see if that helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Re: Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 2:05 pm

No , I am not administrator. ZipReport is a folder name ,inside that report is being generated. I tried with .rxzlog extension as well but found the below error.

Exception Occured :System.Exception: Invalid detail
at Ranorex.PDF.ArgumentHandler.handleArgs(String[] args)
at Ranorex.PDF.Program.Main(String[] args)
at Ranorex.PDF.Creator.CreatePDF(String input, String output, String xml, String details)

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 2:16 pm

vivrai wrote:ZipReport is a folder name ,inside that report is being generated.
The first parameter must be path to rxzlog file, including extension!
vivrai wrote:I tried with .rxzlog extension as well but found the below error.

Exception Occured :System.Exception: Invalid detail
at Ranorex.PDF.ArgumentHandler.handleArgs(String[] args)
at Ranorex.PDF.Program.Main(String[] args)
at Ranorex.PDF.Creator.CreatePDF(String input, String output, String xml, String details)
I believe this new error is caused by wrong "Details" parameter. Your used "PDFReport" is unexpected string! It must be either none, failed or all.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Re: Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 2:27 pm

I am not understanding "It must be either none, failed or all"?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 2:33 pm

You must use one of these parameters (none, failed or all), instead of "PDFReport".
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Re: Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 2:35 pm

i put Details as "all" , now I don't see any error but PDF report didn't get generate.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 2:43 pm

How big is the rxzlog? As far as I remember, it takes some time to generate PDF from large reports. Also, which version of Ranorex do you use?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Re: Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 2:45 pm

Rxlog is just 187 KB. I am using Ranorex version 5.4.1.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 2:57 pm

vivrai wrote:Rxlog is just 187 KB. I am using Ranorex version 5.4.1.
Are you sure you are using correct libs, code modules and stylesheet for your Ranorex version? They are different for Ranorex 6.2 and lower and 7.0 and higher!
https://www.ranorex.com/blog/ranorex-re ... /#download

BTW, Ranorex 5.4.1 is waaaaay to old and no longer supported, so don't be surprised if the conversion won't work even with correct libs.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vivrai
Posts: 20
Joined: Tue Jun 27, 2017 2:43 pm

Re: Unable to create PDF report

Post by vivrai » Thu Aug 17, 2017 3:04 pm

Yes , I am using the correct version . Now I see PDF gets generated , it takes some time generate.
Thanks a lot!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to create PDF report

Post by odklizec » Thu Aug 17, 2017 3:08 pm

Nice to hear it finally works! I told you, it takes some time to generate report and it's even worse with large reports ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration