RSS
16 Feb 2007

And This is Still Needed, for God Sakes!

Author: ceefour | Filed under: Beginner, Complaints, Opinions, Rails, Ruby, Tips

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

This is far from being a Ruby post.

But it got me smiling (although evilly).

// set the shitty parameter stuff (I hate Crystal Reports!!!)
ParameterDiscreteValue pdv = new ParameterDiscreteValue();
pdv.Value = title;
workSessionsByEmployee.ParameterFields["RangeTitle"]
.CurrentValues =
new ParameterValues(new ParameterValue[] { pdv });
crystalReportViewer.ParameterFieldInfo =
workSessionsByEmployee.ParameterFields;
workSessionsReportTableAdapter.FillByRange(
absensiStainDataSet.WorkSessionsReport,
begin, end);
...
workSessionsByEmployee.SetDataSource(absensiStainDataSet);
...
private void crystalReportViewer_ReportRefresh(object source,
CrystalDecisions.Windows.Forms.ViewerEventArgs e) {
  // and this is still needed! For God sakes!!!
e.Handled = true;
}

Yes, it came from a client’s Visual Studio 2005 (C#) project that I wrote (pity who?), only a few months old. ;-)

What it does is filter the report based on a date range. Kinda’ painful to me. I scoured the net, MSDN, whatever, but that’s the best technique I could find at that time (that actually works).

I wonder how similar functionality could be implemented the Ruby way?

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

blog comments powered by Disqus