Solved

Get the report with crystal 8

Posted on 2004-04-01
6
162 Views
Last Modified: 2010-05-02
Hello,

I'm trying to print a report using Crystral 8. In VB I've this code:

Private Sub Command1_Click()
    Me.CR.SelectionFormula = "{FACTURA.num_factura}=frmfactura.textbox1.text"
    Me.CR.Action = 1
End Sub

Private Sub Form_Load()
    Me.CR.ReportFileName = "D:\dev\InFactu\proGym\Reports\Factura.rpt"
End Sub

The problem is that I get the report, but without any data. What wrong / missing.

Pls help me!  Thanks.

0
Comment
Question by:pinheiroa
[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
  • 2
6 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10733800
Maybe your report is not attached to the right DB or theres no data to be shown
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 10733841
0
 
LVL 13

Expert Comment

by:EwaldL
ID: 10736484
currently the report is only showing records, where the field {FACTURA.num_factura} has the  value "frmfactura.textbox1.text". you need to place the frmfactura.textbox1.text outside the string literal.

so try chaning this lineMe.CR.SelectionFormula = "{FACTURA.num_factura}=frmfactura.textbox1.text"

to something simliar to this if the field value is a number
Me.CR.SelectionFormula = "{FACTURA.num_factura}= " & frmfactura.textbox1.text

or if it's a string
Me.CR.SelectionFormula = "{FACTURA.num_factura}= '" & frmfactura.textbox1.text & "'"
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11441052
PAQed - no points refunded (of 250)

modulo
Community Support Moderator
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

617 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