Thursday, December 15, 2011

Crystal Reports 2008 Gotcha: Subreports with multiple parameter values [Field Notes]

The Setup

  • I have a report in Crystal Reports 2008.
  • The report uses a few different sub-reports.
  • The report links the subreports to the main report by passing the main report parameter to the subreport parameter.

The Problem

  • When calculating totals, it works correctly if I pass in a single parameter value to the main report.
  • However, if I pass in multiple values for a parameter to the main report (think multiple work order numbers for a WONUM parameter), the subreport calculates totals for all the fields 

The Solution
At first, it seemed like the issue was due to me not resetting the subreport total calculations on each page. But, I knew that I was doing this, and doing it correctly according to multiple reference points.

However, the issue (and thus, the solution) was simpler.

Because I was passing the main report parameter to the sub-report, Crystal was passing all parameters that I passed into the main report into the subreport, so the subreport was being told to calculate across all those values each time.

Instead, I changed the link to the subreport parameter. Instead of passing it the main report's parameter, I passed it the main report field that contained the work order number, thus assuring that it would only receive that one work order as a parameter.

See the StackOverflow discussion for more references and comments.

Wednesday, December 14, 2011

A brief video on the dangers of SOPA / Protect-IP

And this barely begins to cover it. There's a lot beyond this, too.

PROTECT IP / SOPA Breaks The Internet from Fight for the Future on Vimeo.

Please act on this before it's too late for the internet. [Not Hyperbole]

Important enough that I'm giving it space here. PLEASE take action on this.

Tuesday, December 13, 2011

Another Underwhelming Experience With UPS MyChoice

UPDATE: This is entirely my fault. I leave the text below only as a reference and to shame myself. The issue is that UPS sent me an e-mail at 12:07 saying a package would be delivered the next day. Because it was Sunday night, I thought it would be Monday, but it was technically Tuesday at that point because the e-mail had been sent 7 minutes after midnight.

You win this one, UPS. But maybe batch those e-mails to 4 in the morning or so?

Normally, when you pay for extra convenience despite the fact that a service business's reputation is normally based on that coming standard, you would expect a little something extra, right? UPS MyChoice doesn't seem to think so.

I paid $40 for the year to join the service, which promises more convenient options such as holding shipments at the UPS store, delivering shipments to another address, picking a 2-hour delivery timeframe window, etc. This is great, considering the problems I've had with package carriers.

And at first, the service does seem promising. You receive e-mails that tell you when a package is en route to your address, and when it is expected to arrive -- even if you didn't have a tracking number. This e-mail allows you to change options for the package, etc.

So when I received an e-mail Sunday night saying that my winter gloves would be delivered the next day, I was thrilled. I would be at work, and so I needed to have them hold it at a store.

The e-mail said it would be delivered the next day (Tuesday) between 1:15 and 5:15. I received the e-mail at 12:07am, and at 12:08am I had chosen to have it held at the store. I was very excited that this was working out the way it's supposed to. More than I should be, really.

Fast-forward to Tuesday at 4:15pm. I show up at the store where I'd asked the package to be held, but they didn't get any deliveries for the day. I knew it wasn't supposed to be until 5:15 at the latest, so I asked them to track the package -- only to find out that it had experienced a "delivery exception" (a.k.a "we changed your stuff on you, sorry!"). Why? Apparently when I selected the convenient option of having it delivered to the store that day, they conveniently also added an extra day onto the delivery time.

This is exactly what I was trying to avoid. Get an e-mail at 12am saying a package will be delivered at 5pm. Ask them to hold it at the store down the street, but they need an extra day to figure out how to do that? Also, no notification about an updated delivery date, and no e-mail about a package exception at all. So I still made the extra trip, and I still had the package delayed, only this time I was supposed to feel like it was convenient, and pay them $40 a year for the privilege.

Doubt I'll be renewing that subscription, UPS.


████ to ████ on my █████ █████ ████. ███████ ███████ to it! But for now, ████ is ████ █████████. ██████ ████ ████ to ████ on the ████████ and ████████ ███████████ of ████. ██████. ████ ████ ████████. And ████, ████ you (█████████) ███████ ████ I did ████ ████ ███████████ is ███████ of, █████ ████ ████ ████████ it. ███████ █████████, ████ ███████████ ████ ████ won't █████ ███████.