?
Solved

VB6 with Crystal Report 4.6.1.0

Posted on 2005-03-18
23
Medium Priority
?
718 Views
Last Modified: 2013-12-25
Hi,
I have a VB routine which creates a temporary Records in a Ms Access Database(Access 2000 file format).  I use this temporary Records in Crystal Repot as the data source (SQL/ODBC) for generating reports.  The data stored in the temporary Records depends on custom selections.

My problem is that no matter what the temporary Records content is, Crystal Report will show the same result every time.

I have toggled the "Refresh on every print" check mark on and off, but no new data is retrieved.  The curious thing is that if I manually step through the program, I get the expected results.

What can I do? ... please help me!

I'm using Microsoft Visual Basic 6.0 (SP5) and Crystal
Report 4.6.1.0. CRW32 4.6.1.116

0
Comment
Question by:senthil_msv
[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
  • 12
  • 11
23 Comments
 
LVL 27

Accepted Solution

by:
Dabas earned 1500 total points
ID: 13580976
Hi senthil_msv:
Check under file that you do not have "Save data with Report" checked.


Dabas
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13580992
yes i had checked "Save data with Report"
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13580994
senthil_msv:
Uncheck it!

Dabas
0
Technology Partners: 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!

 
LVL 4

Author Comment

by:senthil_msv
ID: 13581003
I unchecked it, and after run my vb program the same problem exist
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581011
Did you save it after you unchecked it?
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581018
Yes i Unchecked the  "Save data with Report" and saved it. But No records Displayed.
Only Column heading only displayed.
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581028
senthil_msv:
Then it is not the same problem anymore?

Is your  mdb file in the same folder as the CR?
Have you set the Database Location to "Same as Report"?

Dabas
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581037
Have you checked in Ms Access that the temporary table has any records in it?
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581053
yes i have records in temporray table.

After transfer the report file into Dbs path . The Same problem exists

0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581068
And when you run the report from Crystal directly, you see the data?
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581114
No empty data is displayed
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581122
OK. Can you please post the code in VB6 that you use to display the report?
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581136
I create a new project, after adding the crystal report control, then adding the reportfilename property directly..

but no results
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581167
senthil_msv:
Are you using .Action = 1?

Dabas
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581171
yes

        With CrystalReport1
            .Connect = "DSN = HOS; PWD =xxx"
            .ReportFileName = svlFileName
            '.Destination = crptToWindow
            '.WindowState = crptMaximized
            '.SelectionFormula = ""
            .Action = 1
        End With
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581181
Thanks!
Looks Ok. Are you sure the .Connect is correct? Is it needed?
Since you are connecting to an mdb file, I would suggest you comment out the .Connect line
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581189
after comment the same problem exists
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581198
Hmmmm....
When you say no records displayed, can you tell it is the right report you are viewing? Do you have text fields that are appearing, or is it a blank screen?
When you saved the report, did you remove any selection formula from the original report?
Is svlFileName correct?

I am running out of other ideas!
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581214
I am viewing Correct Report, and svlFilename is
    svlFileName = App.Path & "\Clients.rpt"

In my report no selection formula is exists. It is just display the result from the temporary table.
0
 
LVL 27

Expert Comment

by:Dabas
ID: 13581220
When you say no records displayed, can you tell it is the right report you are viewing? Do you have text fields that are appearing, or is it a blank screen?
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581248
i saw the results is Crystal report preview window. each time i refresh the report data it will show the result. That is displaying in each time running from Vb. After your idea.. "Save Data with Report" uncheck it is not display any results


0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581269
If am Check the  "Save Data with Report" the Crystal windows  results only display. If any other record has change, it will not refresh.
0
 
LVL 4

Author Comment

by:senthil_msv
ID: 13581278
ok.. leave it..

How to Set the Page break on every group of records
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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
Course of the Month13 days, 6 hours left to enroll

777 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