[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

stored procedure  parameters using vb6 , sql7 and crystal report 7

Posted on 2001-06-06
4
Medium Priority
?
206 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 800 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

650 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