Stylesheet of Ranorex Report in Version 8.3.2

Ask general questions here.
Megha
Posts: 7
Joined: Mon Feb 04, 2019 5:13 am

Stylesheet of Ranorex Report in Version 8.3.2

Post by Megha » Wed May 15, 2019 11:23 am

Hi,

We are trying to convert Ranorex reoprt to PDF but getting following error :

The given key was not present in the dictionary.
Show/Hide Stacktrace
at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Ranorex.PDF.PDFCreator.CreateHeader(XmlNode rootActivity) at Ranorex.PDF.PDFCreator..ctor(XmlNode rootNode, String xml, RanorexGraphics rg) at Ranorex.PDF.Program.Main(String[] args) at Ranorex.PDF.Creator.CreatePDF(String input, String output, String xml, String details) at Button.ReportToPDF.GeneratePDFReport(String destinationFolder, String reportName) in c:\Users\z003n72v\Downloads\Button\Button\Button\Button\ReportToPDF.cs:line 50 at Button.ReportToPDF.Ranorex.Core.Testing.ITestModule.Run() in c:\Users\z003n72v\Downloads\Button\Button\Button\Button\ReportToPDF.cs:line 62 at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)

The issue as per my understanding is the style sheet used as parameter below method is not compatible to latest report generated. It works fine with Ranorex 6.
Conversion method: Ranorex.PDF.Creator.CreatePDF(inputFile, outputFile,styleSheet,"all");

Can we get the latest style sheet(xml file) for report generated by Ranorex 8.3.2?

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

Re: Stylesheet of Ranorex Report in Version 8.3.2

Post by odklizec » Wed May 15, 2019 11:30 am

Hi,

Am I right assuming, that you are using a custom report template and which was newer updated since 6.x? In this case, you should create a new custom report template in 8.3.2, then replace your existing stylesheet files (xsl and css) with new ones. If you did some custom edits of the stylesheet, then you must edit newly created stylesheet with your changes. Hope this 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

Megha
Posts: 7
Joined: Mon Feb 04, 2019 5:13 am

Re: Stylesheet of Ranorex Report in Version 8.3.2

Post by Megha » Thu May 16, 2019 5:51 am

Hi,
Yes. Exactly. We are doing custom report template and we need the one for 8.3.2. We found one stylesheet in one of the Ranorex tutorial page for version 6 and below. Just wanted to check if anybody is having for version 8.3.2 or not.
Creating custom report template and style sheet would require knowledge in xsl and xml. I guess we will have to give it a try since we have no experience in xsl.

Thanks for the update.

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

Re: Stylesheet of Ranorex Report in Version 8.3.2

Post by odklizec » Thu May 16, 2019 6:00 am

Hi,

Well, then I’m afraid, I don’t know where to get updated custom template for the one you found. Have you tried to compare the customized template with standard 6.x template? If the differences are minimal, it could be relative easy to modify 8.x custom template? Just give it a try 😉
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

Megha
Posts: 7
Joined: Mon Feb 04, 2019 5:13 am

Re: Stylesheet of Ranorex Report in Version 8.3.2

Post by Megha » Thu May 16, 2019 6:03 am

Hi,

Trying to modify .xsl as per our custom report now. Thanks for your inputs :)