[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Visual basic 6 sqlquery method to crystal reports 4.6 being ignored???

Posted on 2007-07-25
7
Medium Priority
?
535 Views
Last Modified: 2008-01-09
Hi,

I have installed my program at a sister company. Everything works as expected except for some crystal reports.
A dynamic query is created in visual basic 6 and passed on to crystal reports.
e.g. crydo.sqlquery = "SELECT * from prints where filenr = 12345"
This works fine at my office, but here it doesn't want to work.
When I set a break point to cut n paste the query into query analyzer, it works fine.

In my office where use Windows Authentication and here I have to use SQL Authentication.
Both offices use ODBC connection for crystal reports data.

The server is running Windows 2003 SP2 with MS SQL 2000 SP4. Nothing else is running on this server.
All workstations are running XP SP2, fully up to date.

Any idea's?
Thanks
0
Comment
Question by:DennisPost
6 Comments
 
LVL 3

Expert Comment

by:RajendraDewani
ID: 19584755
do you get any error or you get the report blank

please check the report which you have installed is not readonly
0
 
LVL 2

Author Comment

by:DennisPost
ID: 19590709
Hi RajendraDewani,

I pass a query to the crystal report that specifies one file only.
When the report is finished loading all reports are loaded. The user then has to find their file anmongst all the rest.
Also before the user can find their file they must first open crystal reports to refresh the data.
Only then will it show up via the visual basic application.

The odbc is using sql authentication.
I am in the process of creating a workgroup network at the moment to experiment a bit more.
0
 
LVL 2

Author Comment

by:DennisPost
ID: 19614978
Turns out I just needed to add one extra line.

cryDO.Connect = "DSN=TestDSN;UID=TestUser;PWD=TestPWD;DSQ=TestDB"
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 19615616
Hi RajendraDewani,

Can you please let me know whether you are using crystal report during runtime with any of the applications like VB? or you are executing the report as a stand alone. Before that I hope that my sugessitions will be helpful to you for solving your problem?.

If you are using crystal report as a stand alone application, then at the design window of the crystal report application in the "File Menu" -> "Save" option you can find a check box which will have the text similar to  "Save report with data"  (Please note that currently I have not crystal report installed in my machine) will be available. Here if you disable the checkbox and then save your report design, i hope that the problem of  refreshing the data while opening the report will be solved. Hope this might help you

by
D.Shanmuga Sundaram
0
 
LVL 2

Author Comment

by:DennisPost
ID: 19616047
shasunder,

Thanks for the tip.

In VB the reports are called up from a local folder. The query for the report is dynmically generated in the VB app. (I think this is what you mean by standalone...??)

Please note that I have requested to close this question as my previous comment has the answer.

Thanks for your time anyway.
0
 
LVL 1

Accepted Solution

by:
Vee_Mod earned 0 total points
ID: 19715735
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…
Suggested Courses

872 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