Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 480
  • Last Modified:

Crystal Reports with VB6

I've developed an application in VB that uses Crystal Reports.
In VB when i run the app. (press F5) everything works fine. So, I've created a setup with 'Package and Deployment Wizard' and instaled in the pc where it was created and works ok.
When i installed in other pc the program works ok with the connections to the SQL working fine, but when i try to print and passing something to crystal report in the "SelectionFormula" I get a run time error ('20536' -Unable to connect.Incorrect LogOn Parameters). If the SelectionFormula = "" it prints OK (So, No Filters). What might be the problem?

(Sorry about my english, I'm working on it)
0
JParente
Asked:
JParente
1 Solution
 
SethiCommented:
Do you specify the path of the Crystal reports file when you access it from VB? If no then do that, becuase when you install your application on some other machine, the path where your crystal report lies may not be same as that of your developing machine. So at runtime specify the path where the user has installed the application and if the report requires any paratemters to be passed then specify those parameters.
0
 
HempeniusCommented:
I think I had a simular problem by changing Crystal formulas by VB code. The problem I was facing was that I was using the VB syntax while the Crystal Reports uses the Crystal syntax as default. If you are also using the VB syntax, this can be the solution for your problem.

In Crystal Reports you probably changed this default on your machine to VB syntax but on the pc on which you installed your app this is most likely not the case. This can be solved by setting the syntax to VB before you change the formula. To give you an example I will give a few lines of VB code. In this project I had a report added called JournalReport:

Dim objReport as JournaReport
Dim objFormula as FormulaFieldDefinition

Set objJournalReport = New JournalReport
For each objFormula in objJournalReport.FormulaFields
  If objFormula.FormulaFieldName = "X" then
    objFormula.Parent.FormulaSyntax = crBasicSyntaxFormula
    objFormula.Text = "Formula = " & TypeID
  End If
Next objFormula.

I hope this will help you.
0
 
nanandCommented:
have you given password to the database?
0
Industry Leaders: 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!

 
DanRollinsCommented:
JParente, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer
0
 
DanRollinsCommented:
Hi JParente,
It appears that you have forgotten to close this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.

JParente, Please DO NOT accept THIS comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
Computer101Commented:
PAQed - no points refunded (of 200)

Computer101
E-E Admin
0

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now