One of my favorite things about Crystal Reports XI is the SQL Command. This is lamented by co-workers who don’t know SQL but sometimes have to deal with my reports, but I effectively decrease the network traffic (though all reports are run internal so it’s not a huge concern) and significantly offload the process onto the server. That said, they have a few stinging caveats.
read more…
I cannot find any posts out there in a brief scan about this, and just hope this is picked up and someone who knows the answers can give them. At home I had an issue that seems to revolve around a set of updates released on October 15th… they seem to relate to the Windows Firewall and even with it turned off, my problems persist.
At work last night they installed a set of updates, I think some from the October 15th slew and guess what? This morning we had to turn off Windows Firewall on our servers because suddenly several things stopped working. The only one I can say FOR CERTAIN was broken was Windows File Sharing. Turning off Windows Firewall fixed this. We have exclusions inside the Windows firewall to allow file sharing even when its on, but either the exclusions are ignored in the newest patch, or somewhere else file sharing is specifically broken.
We got a work-around here at work, but now I’ll just wait for a future patch before my home machine will start to run as desired again.
Aside from the not autosaving issue in the past, my other biggest pet peeve was the whole reason I needed autosave; my Crystal Reports crashes more than a drunk teenager behind the wheel. This issue I have also figured out recently with my new membership in the developer network where there are forums full of knowledgeable users.
Crystal reports does not support dual monitors.
In case you missed that:
CRYSTAL REPORTS DOES NOT SUPPORT DUAL MONITORS!!
Yet again, I am glad to know the reason behind my issue, but I sure would like to know why it is that I cannot think of a single other product… of any sort… on the market today that will crash just because the system has two monitors installed. Note, it’s not that I’m trying to use two monitors… the mere existence of the second monitor evidently makes Crystal unstable. Out of our 4-man IT group, the other 3 can do this just fine, but for me Crystal gets incontinent and dumps all over the place when I try to do just about anything.
I have previously posted that Crystal Reports does not autosave even when you have the option turned on.
I was mistaken.
Crystal Reports saves the currently open report to: C:\Documents and Settings\[[USERNAME]]\Local Settings\temp
With the name: reportname.autosave.rpt
If you have not saved it yet, you’ll see like Report1.autosave.rpt
I stand corrected. Now what they were thinking when they decided that auto-saving to an entirely different directory and file name was a good idea escapes me. Beyond that, why they don’t have some sort of detection that there is an auto-saved version that you may want to load up also escapes me. As I have pointed out before, any modern word processor or document design product out there does this and why they cannot, I don’t know. However, my time should be wasted no more as I can recover the autosaved documents from this folder at least.
I finally decided to extend my olive branch to Crystal Reports (SAP more correctly) and try to be proactive rather than just whining here.
I went to their website to log some BugTracker-type issues so that they could investigate and either fix (in one case I KNOW it’s an issue with the software) or offer suggestions as to what in my environment may be causing my bile to rise every time I have to work with Crystal. Well, you have to register in order to log an issue; this is not all-together unexpected nor is it unreasonable, so I attempt to create my login.
Denied…
read more…
The Telerik WinForms RadGridView control has proven to be very impressive to me thus far. Anything that automates and manages a large portion of the creation and functionality of your application is going to make decisions you don’t like but overall this one seems very good.
The Good:
I created a typed DataSet, complete with proper relationships between master/detail tables.
I then dropped a radGridView control on the form, set the datasourse as my dataset, the member as my ‘master’ table and then told it to AutoGenerateHierarchy. In those couple easy steps I created a triply-nested datagrid that admittedly wasn’t very pretty but it functioned as would be expected and was about 50% of what I needed out of the simple application request I received.
For the Good of the filters, it was very easy to create a filter following their example, and very easy to perform filtering based upon integer values. Also the filter/gridview are very responsive with small to moderate-sized datasets, but I’ve not tried anything large yet.
The Bad:
I created a filter and programatically placed it on one of the columns per their tutorial and was disturbed to find that using their EqualTo function, pasting the contents of a cell into the filter bar did not return any results. This means that the cell from which I took the value did not match itself. I did figure out what was happening (details here); basically their filter was stripping prepending spaces for comparison despite visually displaying them. This meant that pasting in ‘ 41′ would not match ‘ 41′ but rather ‘41′.
The Fix:
Just strip prepending spaces in your query/dataset before putting it into the grid if possible. If you cannot, they have responded in the afore-mentioned and linked forum post that they may change the functionality in the future.
So, strings are immutable. What this means is application is that modifying a string creates new string data on the heap and modifies the pointer on the stack to point to the new location. The data on the heap that is not referenced from the stack will be cleared at garbage collection time, but until then it’s wasteful.
In comparison, StringBuilders are mutable. Modifications/additions to the stringbuilder will update the data in the heap instead of making copies of it each time.
(StringBuilder sb = new StringBuilder; sb.Add(“test”); sb.Add(” and test2″);
That code will create a pointer on the stack and a data value on the heap, update that data value to add the second string and that’s it. Doing the same with strings would have left an abandoned string data value on the heap of value “test” waiting on the GC.
I got the books for the MCPD and have started studying and have found a couple interesting facts that I’m sure I should have known but thought I would share a little.
Of the numeric types, I always assumed you should use the smallest type that fit your usage. If you needed numbers 1-100 you could easily use a tinyint, etc. Turns out that since the compiler is optimized for 32-bit, ‘Integer’ is the most efficient type. If you are trying to squeeze every last bit of memory out of the application, fine, but for most apps, Integer will be better performance than any other numeric type.
- Crash without any sort of handling.
- Create Report1.rpt
- Add a MS SQL 2005 View as the sole datasource.
- Drag any number of fields onto the report.
- Save and close report.
- Copy Report1.rpt to Report2.rpt
- Open Report1.rpt, open Report2.rpt (order I believe to be important)
- In Report2.rpt, attempt to drag any data field from the view that both reports are based upon onto the designer surface.
- This one I have not narrowed down nearly as much, but it was on a report that had 6 datasources. Two were Views from our ERP and the other 4 were SQL Commands that I wrote that extracted information from another View (all 4 commands hit the same view). I had been working on this one all morning, so it’s anyone’s guess as to what happened but the steps directly preceding were:
- Create a formula field that calculated based upon a total of 3 values from 2 of the SQL Command objects
- Create a running total that totaled based upon that field, sum as the type, evaluate on the inner most group change, reset on the middle group change (3 groups total)
- Place the running total field in the group footer for the middle group
- I did some other things here, I don’t know what all…. but eventually I did the following.
- Remove the running totals from the group footer, noting that this then unchecked them in the Field Explorer, showing that they were no longer in use anywhere.
- Delete the running totals from the Field Explorer, and at this point it crashed the same as it does when following the first bug recreation instructions
This setup will cause a crash 100% of the time.
The best I can tell is that Crystal Reports is not very thoroughly tested when interacting with Views instead of Tables OR the views in our ERP have some sort of flag set or property that is causing Crystal Reports some serious fits. This sucks as ALL the canned reports within the ERP are based upon the Views in the ERP and that’s what I work with the most.
Help?
- Error handling. Handle your freaking errors. Seriously. How amateur is this crap? I’ll post specific examples of what causes some of your unhandled errors, but it occurs in so many ways that I actually would be as happy as a teenie-bopper with a new iPhone app if your software would just not crash like a 9th grade introduction to programming application.
- Incremental saves. Gmail, a web app, can figure this out. Every single Microsoft Office application I know of can do this. My little junky small-domain web app that I did for my present employer does it… why can you not detect idle time and save? Even though I found the option for this before I finished this post, I felt dishonest deleting my uneccesary rant. Thank you for this feature… evidently it’s turned off by default which just cost me 4 hours of work (yes, I forgot to click save… but I don’t normally HAVE to).
- Allow nested subreports. Make this a flag inside the options. I understand the risk of nested sub-reports, but given that I’m a developer, I deserve what I get if I infinite-loop-nested reports or design something crappy that nests down to 200 levels or something idiotic. I find almost every week that there is a new report that I REALLY need to be able to nest 2-3 of our existing reports into one report and I cannot do that because almost all of my existing reports already have subreports. Give me a flag ‘Unsafe Mode’ or ‘Allow Nested Subreports (WARNING THIS CAN CAUSE CANCER)’.
That’s all for now. #2 really was the main steam behind all this and now I found the option and feel like an idiot. Regardless, 1 and 3 would be great. My next post will try to isolate situations where I’ve had #1 occur… repeatedly.