For future reference to others that may find my post, subclassing
ReportDocument and overriding the RefreshReport method is not a viable
option because CrystalReportViewer will not trigger a reload of data if it
sees that the parameters in its ReportDocument haven't changed. You have to
handle the ReportRefresh event (there is no override) in CrystalReportViewer
itself and in it 1. call the refresh method of the report document, 2.
update its parameters, then 3. set CrystalReportViewer's report source to
its report source (no change).
IMHO this is rather clunky, almost smells like a workaround to less than
well-thought-out design. But they refuse to call any behavior a "bug",
probably to keep the $200 I paid them to impart the knowledge I'm sharing
here.
I really dislike Crystal now. I may be stuck with it in my current
deployment but I'm going to looking for other DotNet reporting solutions
(purely DotNet, not this bastardized COM crap) when I have the opportunity.
Bob
"Bob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm asking here because I've posted this question in the crystal
newsgroup,
> waited two weeks, and got zero response. I would be very appreciative if
> someone could shed some light on this problem for me.
>
> I'm using the CrystalDecisions.Windows.Forms.CrystalReportViewer available
> in CrystalDecisions.Windows.Forms.dll, version 9.2.3300.0.
>
> Why does the crystal report viewer refuse to reload its data when the
> RefreshReport method is called if the report parameters haven't changed?
Can
> I force it to always refresh or will I have to cobble together an ugly
> workaround?
>
> Bob
>
>
|