
BUG - Crystal report SQL command line get executed twice!!!
I have a vb.net console app. that takes a SQL query as a parameter,
fill a dataset and pass it to my
Crystal Report, then print the
report.
I went through a special bug where as soon as I called my report's
PrintToPrinter method, it executed the SQL command line defined inside
the report whereas my .SetDataSource method was already called passing
a valid dataset as parameter.
This meant that it executed 2 SQL commands, the 1st one was OK, it was
the one I sent to fill my dataset and pass it to the .SetDataSource
method but the 2nd one was unwanted (because it is used only for
design purposes) and called upon PrintToPrinter execution.
The only way to get rid of this situation was to completely uninstall
the redistibutable framework (dotnetfx.exe) and replace it by the full
framework SDK one along with the framework SP2 (build 1.0.3705.288).
Hth,
Sylvain Audet - MCP+SB
Astuces .NET mensuels sur
http://www.*-*-*.com/