Home All Groups Group Topic Archive Search About

vb.net and crystalreportviewer solution

Author
10 Nov 2007 2:53 AM
rob
Hi Everyone,

   I have a project which will migrate crystal report from vb to .net,
and I decided to use vb.net and crystalreportviwer. However I have the
code with vb6 like (using crystl32.ocx)

  with .crystalreport
    .sqlquery = 'mysql query is here'
    .action = 1
     .....

this to do the query from my odbc settings.

How to use this kind of way in crystalreportviewer?


Thanks,
R

Author
10 Nov 2007 9:09 AM
Cor Ligthert[MVP]
Rob,

Have a look at this,

http://www.vb-tips.com/ReportSample.aspx

Cor
Author
14 Nov 2007 5:00 AM
rob
On Nov 10, 4:09 am, "Cor Ligthert[MVP]" <notmyfirstn***@planet.nl>
wrote:
> Rob,
>
> Have a look at this,
>
> http://www.vb-tips.com/ReportSample.aspx
>
> Cor

Hi Cor,
   Thank you for your replying.
   This is very good example and I have learned something from it. I
have another question for you regarding the crystalreportviewer, for
example in vb6 i will do
   with rpt
    .action =1   'do the report loading
    .sqlquery = select ** from  *** where ....     ' this will do the
runtime query from my ODBC settings.

  At the first part of program user has login in program with ODBC
settings. I need to get solutions that how crystalreportviewer uses
runtime sql to do the report loading.  I have finished like:

    parameterfield.fieldname ='***'
    parameterfield.add ...    'Add the pareameterfield value
    parameterfields.add(parameterfield)

    How to get parameterfields and SQL QUERY to do the report loading
based on ODBC, or you can give me some sample code.


Thanks a lots
Rob