Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report 4.6

Status
Not open for further replies.

ICTECH

Technical User
Jun 5, 2002
131
0
0
CA
I have a report that I'm wanting to be able to change the Date the report is looking in the Database for the in information. But I can't seem to get it to work. When I hard incode a date into the file it will display the information.

Was wondering if anyone had any ideas on how to get a VB6 app to give the Date to the report at run time???

Been trying to use:

CrystalReport.SelectionFormula = "{Bookings.Date} = 6/24/2002"

But I get the following error message:

Error in Formula.

Thanks for any help ya me have to offer....

 
It shouldn't have a problem.

What if you save the report with data for 2 drivers and launch it then? That will tell you if the report has trouble GETTING the data or DISPLAYING the data.

Ken Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
When I am not sure that a record selection formula is passing correctly, I place the "RecordSelectionFormula" special field in the report.

You can then copy that into your report straight from the designer and see what kind of results you get.

Just one more troubleshooting suggestions.

Lisa
 
Hi Ken and Lisa...

Sorry I haven't gotten back to you sooner.. Been away on vacation and just got back...

(Ken) I tried your idea about saving the data with the report and then seeing if it displays.. It did. I commented out the selection formula in VB and it displayed.

Hmmm..

(Lisa) I'm not that familair with Crystal Report 4.6 yet and not sure how to do your tip.. Sorry...

 
So you see that the problem isn't in displaying the data it has, it is in retrieving the correct records. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi Ken...

Something that I ran into now, When I setup VB to print the report (with no Report window being displayed) when you click the print button. It prints but when I close out the form I get an error message. How would I close the Crystal Report window?

I tried:

Unload CrystalReport1

But that didn't do anything except give me other error message.. Hmmm...
 
Hi Ken...

Sorry.. Figured what I had done wrong...

Thanks..

 
I have this problem, could someone help me out?

I'm working on an application with VB 6, and Crystal Reports 4.6, and Access 97 as the database.

My Access database needs a password to open it. So where do I input the password? I did this, and it doesn't work:

CrystalReport1.ReportFileName = App.Path & "\PO.rpt"
CrystalReport1.UserName = "Admin"
CrystalReport1.Password = "wawan"

CrystalReport1.Formulas(0) = "strMR='" & wmr & "'"
CrystalReport1.Formulas(1) = "strVendor='" & wvendor & "'"
CrystalReport1.Action = 1

But if I unset the password to the database, it works...
I'm really confused, I need this done fast.
 
Wawan,

I will guess that when it 'works' it is either showing you saved data from when the report was created, or it is working because it already has your password. You want the Connect property or LogOnInfo.

If you need further help, please start a new thread for your question. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi Ken,

Yes, I believe the problem is connecting to the secured database (like in ADO, we use Connectionstring). Because when I unset the password to the Access database, I was able to perform the tasks I wanted, like create reports per vendor or by MRs. But then, I really need the database secured. So I'm stuck... :)
Would you show me the coding in VB, how to show the report if:
- name of the report is "PO.rpt"
- name of the database is "Comparison.mdb"
- password to open the database is "wawan"

and I believe it doesn't concern the formulas in the report, right? 'Cause the problem is connecting to the database, right?

Thank you so much Ken, best regards from Indonesia.

 
Please post this as a NEW thread in the Integrate forum. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top