Crystal and SQL Server Stored Proc's and VB6 
Author Message
 Crystal and SQL Server Stored Proc's and VB6

Hi
Could someone please tell me how you do the following in VB6

1.    Open an existing Crystal Report
2.    Connect the report via the SQL 2000 Stored Proc that is used to
populate the report to the database using ADO
2.a  Populate the Stored Procedure parameters and the report parameters (
passed to the procedure at runtime from a VB Forms controls )
3.    Display the report
4.    programmatically export it as a PDF file ( either before or after it
is displayed )

The
report path
database login
database password
filename ( for the pdf export)

will all be passed as parameters to the main procedure

The oldb provider will be hard coded ( for the time being ) as SQLOLEDB

I will have set a reference to the ActiveX Designer Run Time Library
and added the Crystal Report Viewer to the VB form and added a reference to
the ActiveX 2.7 ADO Library

The following will be added to the general declarations section of the form

Dim crApplication As CRAXDRT.Application
Dim crReport As CRAXDRT.Report

The following will be added to the form load event

Private Sub Form_Load()

     Set crApplication = New CRAXDRT.Application
     Set crReport = crApplication.OpenReport( "report path")

NOW I AS STUCK
I have tried many different solutions all of which failed

Any and all help welcome

Thanks in Advance

James



Tue, 09 Nov 2004 07:25:14 GMT  
 Crystal and SQL Server Stored Proc's and VB6
This is a really late reply. But what you require can be done. If you
haven't figured out how to do it, just reply to this message, and I will
explain a few techniques to achieve your requirement.


Quote:
> Hi
> Could someone please tell me how you do the following in VB6

> 1.    Open an existing Crystal Report
> 2.    Connect the report via the SQL 2000 Stored Proc that is used to
> populate the report to the database using ADO
> 2.a  Populate the Stored Procedure parameters and the report parameters (
> passed to the procedure at runtime from a VB Forms controls )
> 3.    Display the report
> 4.    programmatically export it as a PDF file ( either before or after it
> is displayed )

> The
> report path
> database login
> database password
> filename ( for the pdf export)

> will all be passed as parameters to the main procedure

> The oldb provider will be hard coded ( for the time being ) as SQLOLEDB

> I will have set a reference to the ActiveX Designer Run Time Library
> and added the Crystal Report Viewer to the VB form and added a reference
to
> the ActiveX 2.7 ADO Library

> The following will be added to the general declarations section of the
form

> Dim crApplication As CRAXDRT.Application
> Dim crReport As CRAXDRT.Report

> The following will be added to the form load event

> Private Sub Form_Load()

>      Set crApplication = New CRAXDRT.Application
>      Set crReport = crApplication.OpenReport( "report path")

> NOW I AS STUCK
> I have tried many different solutions all of which failed

> Any and all help welcome

> Thanks in Advance

> James



Tue, 30 Nov 2004 23:26:55 GMT  
 Crystal and SQL Server Stored Proc's and VB6
I have the same problem as James below. The two
differences that I have is that I am only passing one
parameter (a number) and I am using the crystal control on
my VB form.

Any help would be greatly appreciated.

TIA
Nate

Quote:
>-----Original Message-----
>This is a really late reply. But what you require can be
done. If you
>haven't figured out how to do it, just reply to this
message, and I will
>explain a few techniques to achieve your requirement.



>> Hi
>> Could someone please tell me how you do the following
in VB6

>> 1.    Open an existing Crystal Report
>> 2.    Connect the report via the SQL 2000 Stored Proc
that is used to
>> populate the report to the database using ADO
>> 2.a  Populate the Stored Procedure parameters and the
report parameters (
>> passed to the procedure at runtime from a VB Forms
controls )
>> 3.    Display the report
>> 4.    programmatically export it as a PDF file ( either
before or after it
>> is displayed )

>> The
>> report path
>> database login
>> database password
>> filename ( for the pdf export)

>> will all be passed as parameters to the main procedure

>> The oldb provider will be hard coded ( for the time
being ) as SQLOLEDB

>> I will have set a reference to the ActiveX Designer Run
Time Library
>> and added the Crystal Report Viewer to the VB form and
added a reference
>to
>> the ActiveX 2.7 ADO Library

>> The following will be added to the general declarations
section of the
>form

>> Dim crApplication As CRAXDRT.Application
>> Dim crReport As CRAXDRT.Report

>> The following will be added to the form load event

>> Private Sub Form_Load()

>>      Set crApplication = New CRAXDRT.Application
>>      Set crReport = crApplication.OpenReport( "report
path")

>> NOW I AS STUCK
>> I have tried many different solutions all of which
failed

>> Any and all help welcome

>> Thanks in Advance

>> James

>.



Mon, 13 Dec 2004 23:14:39 GMT  
 Crystal and SQL Server Stored Proc's and VB6
check out my answer to your question above. BTW, please read Crystal Report
help files. They answer most of the rudimentary questions.


Quote:
> I have the same problem as James below. The two
> differences that I have is that I am only passing one
> parameter (a number) and I am using the crystal control on
> my VB form.

> Any help would be greatly appreciated.

> TIA
> Nate

> >-----Original Message-----
> >This is a really late reply. But what you require can be
> done. If you
> >haven't figured out how to do it, just reply to this
> message, and I will
> >explain a few techniques to achieve your requirement.



> >> Hi
> >> Could someone please tell me how you do the following
> in VB6

> >> 1.    Open an existing Crystal Report
> >> 2.    Connect the report via the SQL 2000 Stored Proc
> that is used to
> >> populate the report to the database using ADO
> >> 2.a  Populate the Stored Procedure parameters and the
> report parameters (
> >> passed to the procedure at runtime from a VB Forms
> controls )
> >> 3.    Display the report
> >> 4.    programmatically export it as a PDF file ( either
> before or after it
> >> is displayed )

> >> The
> >> report path
> >> database login
> >> database password
> >> filename ( for the pdf export)

> >> will all be passed as parameters to the main procedure

> >> The oldb provider will be hard coded ( for the time
> being ) as SQLOLEDB

> >> I will have set a reference to the ActiveX Designer Run
> Time Library
> >> and added the Crystal Report Viewer to the VB form and
> added a reference
> >to
> >> the ActiveX 2.7 ADO Library

> >> The following will be added to the general declarations
> section of the
> >form

> >> Dim crApplication As CRAXDRT.Application
> >> Dim crReport As CRAXDRT.Report

> >> The following will be added to the form load event

> >> Private Sub Form_Load()

> >>      Set crApplication = New CRAXDRT.Application
> >>      Set crReport = crApplication.OpenReport( "report
> path")

> >> NOW I AS STUCK
> >> I have tried many different solutions all of which
> failed

> >> Any and all help welcome

> >> Thanks in Advance

> >> James

> >.



Wed, 15 Dec 2004 11:57:49 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Crystal report using SQL stored proc locks server!!

2. know anything about Stored Proc and using SQL Server 2000, CR8.5 and VB6.0

3. Dynamic SQL stored proc call from Crystal?

4. SQL Stored Proc with Crystal

5. Crystal report & SQL stored proc

6. Stored Proc Return values / Output Params w ADO and SQL Server 7

7. SQL Server stored proc to VB Source generator

8. Stored Proc Return values / Output Params w ADO and SQL Server 7

9. SQL Server stored proc to VB Source generator

10. running a SQL Server query or stored proc from VBS

11. Datetime Parameter to SQL Server stored proc

12. Date to SQL Server stored proc

 

 
Powered by phpBB® Forum Software