Solved

stored procedure  parameters using vb6 , sql7 and crystal report 7

Posted on 2001-06-06
4
200 Views
Last Modified: 2010-05-02
when using stored proc. paramaters to fill the reports , i get the last saved data when the reports load, eventhough the options for discardsaveddata, and verify on everyprint ect. has been selected, the reports worked for a while and the all of the sudden started happening this problem , by the way i am are working with three projects that use the same reports but against diferent databases
0
Comment
Question by:todosunidos
4 Comments
 
LVL 1

Accepted Solution

by:
dalexis earned 200 total points
ID: 6161353
The Crystal folks just don't get it when it comes to using stored procs.  If you've ever tried to get tech support from them on this problem you would quickly come to the same conclusion. :)

Anyway, one of the biggest problems with Crystal is that is stores the server/database info in the Report file, and you're out of luck trying to use the same report against different databases or servers by altering the settings in code.

You have to re-verify the database settings against each server/database from within the Crystal Reports Designer UI.

What you're probably seeing is not that you're getting previously saved data with each run of the report, but that it's always going against the server/database hard-coded in the Report file, rather than what you are setting thru code.

There is one way to fool it into doing what you want, and it involves having the Crystal Engine create a new DSN on the fly for the appropriate server/database connection using the LogOnServer method of the Print Engine.  Then you have to iterate through the Tables collection within the Report.Database object and reset the Location property with the database/table info.

Nasty stuff.  I lost quite a few hairs over geting Crystal to work.
0
 
LVL 3

Expert Comment

by:Joebob
ID: 6161588
Why not have VB run the stored procedure and receive the recordset from the database?  You could then pass the recordset to Crystal and have it just display the results.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7133357
Hi todosunidos@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept dalexis@devx's comment(s) as an answer.

todosunidos@devx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7167820
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question