Solved

stored procedure  parameters using vb6 , sql7 and crystal report 7

Posted on 2001-06-06
4
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

705 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