Today I had to make a new report in HR.Net Document Explorer. Unfortunately version of HR.Net I’m using is buggy.
Every time you try to view a report preview, it crashes:
Vizual claims that this error is because I’m running 64-bit OS, but their software is only supposed to work on 32-bit. But if I create a sub-report, I can run a preview on that. I think lousy coding standards are at fault here and nothing to do with 32/64-bit compatibility. And Vizual support just tries to make themselves look less bad.
Anyway, after some poking about, I have found a database table where these report definitions are stored as XML. And we can manipulate XML as we wish! One of the properties report XML-definition is <Orientation>. It is set to 1 for Portrait page layout and 2 for Landscape (I did compare different reports). So now all we have to do is replace this value in the database:
update [dbo].[OC_REPORTS_REPORTDEFINITIONS] set DEFINITIONDATA = cast(REPLACE(cast(DEFINITIONDATA as nvarchar(max)), '1 ', '2 ') as ntext) from [dbo].[OC_REPORTS_REPORTDEFINITIONS] repdef inner join OC_DOCUMENTS docs on repdef.DOCUMENTID = docs.DOCUMENTID where docs.DOCUMENTNAME = 'My Report Name'
Replace “My Report Name” with name of your report. Before running this query, please make a copy of your report – there is no guarantee that this will work, also there is a chance that your report might be messed up beyond recognition.
Also if you have sub-reports, they also will become Landscape. If this is your goal, then no problem. If not, you’ll have to go through all sub-reports and modify them back – you are in luck here. Document Console allows to modify the sub-report orientation without throwing errors.
incredibly frustrating “bug”, building reports is an utter pain having to preview them by running the damn thing in the web console every time, this issue has been around for longer than i can remember, shame on them! great blog!
I actually remember when you could preview the report without going to the web-console. So this bug is a relatively new thing.
I did run a decompiler on their code and my eyes bled. What a mess! No wonder they introduce shits like that by mistake.
I also had a question that you may be able to answer, my company since i pointed out our forms could be turned into wizard format have asked me to convert near enough every multi tabbed workflow into a wizard, fair enough.
but in doing so they lost their precious “save as draft” button which has caused a lot of heartache and frustration, in referencing some old documentation and legacy workflows, it looked like there was actually code in the in in form custom code section to add such a button, didnt seem to work mind you. I spoke to vizual support who claimed ignorance and claimed such a thing was impossible.
Is there anything that can be done about this? it would be useful to have back as our end users really cant grasp the concept of it not being there any longer. thank you!
Actually, I completely forgot how to turn forms into wizards (see how often I’ve done them?!). Poked about and could not do it.
And I looked on Save As Draft button and could not quickly determine what exactly it is doing and how to reproduce it reliably. Sorry, you are on your own here -(
haha, not a problem I was just curious. For this very reason and an incredibly painful roll out due to constant time outs (even when the time out was increased to three hours…) I’m going to have to remove the wizard tool due to the lack of save as draft or auto save as draft java function. Oh and by the way HRnet.FormUtilities.Wizard(“TabbedFolder1”) is how I always executed it.