?
Solved

I want to refresh data in crystal report from vb aplication

Posted on 2003-03-10
9
Medium Priority
?
357 Views
Last Modified: 2008-03-17
I want to refresh data in crystal report from vb aplication.

I am using MS Acess Database.

I had selected the option in crystal report option "refresh data on every print"

If I am giving discard saved data true from vb it gives the error.

Please guide me how to refresh the data from vb application.
0
Comment
Question by:prashant786
[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
  • 3
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 8108954
What error do you get?

What code are you using in VB to display the report?

mlmcc
0
 

Author Comment

by:prashant786
ID: 8118745
There is no error

Old data is displayed. and it is not refreshed.

guide me how to refresh
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 8119006
You said
>> If I am giving discard saved data true from vb it gives the error.


I don't think it takes a value

Try using before you open the report

crRpt.DiscardSavedData

mlmcc
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 101

Expert Comment

by:mlmcc
ID: 8119020
What code are you using to display the reports?

mlmcc
0
 

Author Comment

by:prashant786
ID: 8124919
I am using ocx. Code is as below :

rep.destination=crpttowindow
b=chr$(34) &text1.text & chr$(34)
d="{aa.kap}=" &b
rep.groupselectionformula = d
rep.action=1

If I am giving discard saved data then it is givin error :

unable to connect; incorrect log on parameters

So please solve my problem
0
 

Author Comment

by:prashant786
ID: 8133598
Hellooo please answer me mlmcc

waiting for your answer
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 200 total points
ID: 8133878
Here is the code I use    


cr_Generic_Report.ReportFileName = "C:\MyApp\Myreport\Report.rpt"
cr_Generic_Report.ReplaceSelectionFormula "{MyTable.MyField} >= 90"
cr_Generic_Report.WindowState = crptMaximized
cr_Generic_Report.Destination = crptToWindow
cr_Generic_Report.WindowShowCloseBtn = True
cr_Generic_Report.WindowShowPrintSetupBtn = True
cr_Generic_Report.Action = 1

mlmcc
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month9 days, 6 hours left to enroll

762 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