No problem. Crystal is pretty difficult to use for sure, and the .NET api is not intuitive.
We wanted custom parameter forms too, which adds a bit of complexity. By parameters I don't mean the search parameters, because those go to the ibatis call to get the data. I mean the Crystal ones. For example, we select data for a specific day and want to display that day on the report. - I created 1 object per report. It's a simple DTO which has a field for each column in the report. If numerous reports are pretty similar then they could of course share this object - this object gets mapped to a view in iBatis.net in the usual way - using the crystal designer, I map this same object to the report. You can do this with Field Explorer -> Database Fields -> <right click> -> Database Expert. Select .NET objects and map it. The problem here is that I can't get Crystal to see .NET objects outside of my current project which really sucks. It means in my case I have to put my Crystal reports in my "common" project which gets deployed to the client and the server. My code looks kind of like this. It's actually abstracted all over the place, but here's the idea: GeneratedCrystalReportClass report = new GeneratedCrystalReportClass(); // this is the .cs file that gets generated when you make a .rpt. report.SetDataSource(listOfObjectsFromIbatis); // here's the part where you owe me lunch: ParameterValues parameter1 = new ParameterValues(); ParameterDiscreteValue parameterValue = new ParameterDiscreteValue(); parameterValue.Value = DateTime.Now; parameter1.Add(parameterValue); // "theFieldNameInCrystal" is a Parameter Field you make with the field explorer in crystal. If you don't set it here then crystal will pop up its own ugly dialog // so the user can set it. report.DataDefinition.ParameterFields["theFieldNameInCrystal"].ApplyCurrentValues(parameter1r); Hopefully that gets you on your way. It's not hard code but the documentation and error reporting is garbage. Regards, Dustin >>> "Dorin Manoli" <[EMAIL PROTECTED]> 4/25/2007 8:11 AM >>> To Dustin: Can you share with us a few samples/ideas? Because I am beginner with Crystal Reports, I found difficult to create a report at runtime and design-time too. :( -----Original Message----- From: Dustin Aleksiuk [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 24, 2007 8:48 PM To: [email protected] Subject: Re: report tool We use iBatis.NET and Crystal. Works fine. iBatis maps a view to a DTO-type object. We give a list of these to the report object as a datasource and it works great. I'm just doing one right now. Regards, Dustin >>> "Dorin Manoli" <[EMAIL PROTECTED]> 4/24/2007 9:39 AM >>> Hi Dose anyone use iBATIS in combination with a report tool? I'm willing to use Crystal reports. but I am not familiar with it. Does anyone try this combination? Precision Marketing Information Limited, trading as Data Ireland, registered in Ireland, registered number 224335, Registered Office: General Post Office, O'Connell Street, Dublin 1. Kompass Ireland Publishers Limited, registered in Ireland, registered number 98432, Registered Office: General Post Office, O'Connell Street, Dublin 1. Precision Marketing Information Limited, trading as Data Ireland, registered in Ireland, registered number 224335, Registered Office: General Post Office, O'Connell Street, Dublin 1. Kompass Ireland Publishers Limited, registered in Ireland, registered number 98432, Registered Office: General Post Office, O'Connell Street, Dublin 1.

