cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal XI, MySQL, VB.NET, Stored Procedures

Former Member
0 Kudos

I'm using the "PULL MODE" to print Crystal Reports from VB.NET 2003 (letting the REPORT read the data / NOT doing the "select" in the VB...). If I only have one level of data in the report and read the TABLES directly into the report, they work fine using the "ApplyLogonInfo" method for pointing the report tables to the datasource. Subreports work fine using that, too, if the TABLES are the top-level data source.

BUT if the primary datasource of the report is a MySQL STORED PROCEDURE (with or without a parameter), I do NOT know how to assign the datasource to the procedure. There is no "PROC" or "STOREDPROC" or anything like that in the

CrystalDecisions.Shared.ReportObjectKind.??? to set the login for?

Anyone have any sample code to set the data source or logininfo for a STORED PROCEDURE??

Anything similar to :

"For Each tbCurrent In myReport.Database.Tables"

for procs??

Thanks, much - it's probably right there and I'm just not seeing it

Robert

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The stored procedures show up as "command" table in the data source box in the report. Can ANYone tell the what collection they are a part of, and how to set the data source for them from VB.NET?? I'm getting desperate here!!!

Answers (1)

Answers (1)

former_member208657
Active Contributor
0 Kudos

Crystal Reports treats a stored procedure as a table. This is because the stored procedure must return a table structure. In most cases people initially design their reports against a stored proc then they will update the server/database or location later in code. In most cases all works find and you refer to the stored proc location like you do in a regular SQL statement.

I'm not up on my MySQL syntax so I'm not sure how the reference works there.

Did you get the report to work in the designer? That should be your first step.