In addition to the methods described in Troubleshooting DNG document generation with RRDG there is one more technique you can use to debug document generation in DNG: replicate the DNG document generation in a standalone RPE installation but the using RPE templates deployed on the DNG server and the DSX files created by DNG.
NOTE if the RRDG engine in DNG and the RRDG version in your standalone RPE are different the results you obtain in the two environments can be very different. Still this method remains valid and useful to understand the inner workings of RRDG in DNG.
When you use the “Generate a Document-Style report” function DNG will use all the selections you make in the wizard in order to build a document specification ( dsx) which it then passes to DNG. The DSX file are stored in <SERVER_INSTALLATION>\server\tomcat\temp\rrc_reports
NOTE the files are cleaned up automatically by DNG after a while so you need to access them soon after they are generated.
The DSX files can be loaded and executed almost as they are in a standalone RPE Launcher. The only change you need to make is to set the output path in a location where you have write access since the OS user account under which DNG runs might be different from the one you use to run RPE Launcher. See the red highlight in the image below.
When you open the DSX file in launcher you will notice that the RPE templates and the stylesheet ( if any) are referenced from their DNG server location. See the blue highlight in the image below.
If you look at the data source you will notice 2 things:
- the actual URL that DNG passes to RRDG – confirming the right URL for the template is used is the very first step in identifying and correcting a problem
- the cookies parameter – unlike document generation from standalone RPE, the RRDG engine running in DNG receives and uses for authentication the OAuth key for the current session. You can see this value in the browser by using tools such as Web Developer in FireFox.
The OAuth key is valid as long as your DNG session remains valid ( you are still logged in DNG) and allows you to run the DSX from a standalone RPE as is. This means that you can run the document generation from within your standalone RPE to more easily monitor the progress as well as gaining access to more detailed log information.