Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Selection On Data On Crystal Report


I'm new with Crystal Reports in VB. Now I've created a report within Crystal Reports. This works well. The source for the report is the database that also is being used by my VB-application. Now I Call the report from my VB-application and it is being shown, but with all the data from the database of course. How can I do a selection on the data being showed? The user can select a week in the VB-app for example and only the appointments for that week have to be shown in the Crystal Report. How do I do this? Thnx a lot 4 the reply's in advance...




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Error On Selection Formula To Display Data On Crystal Report From SQL Database
I have a problem on selection formula to display data from SQL database on crystal report it produce an error like this:
error A number, currency amount, date, time, date-time or string is expected here



Code:

Dim Ap As New Application
Dim Rep As Report

Private Sub CRV_Click()

End Sub

Private Sub Form_Load()

Dim RepFileName
RepFileName = App.Path & "LeaveForm2.rpt"
Set Rep = Ap.OpenReport(RepFileName)
Rep.RecordSelectionFormula = "{tblLeaveApp.EmpNo}=" & ndEmpNo ->error is here
Rep.DiscardSavedData
CRV.ReportSource = Rep
CRV.ViewReport
CRV.Zoom 100

'frmcrs.Enabled = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
Form6.Show
End Sub






anyone can help me....

Crystal Report Crosstab Report Criteria Selection Using Access 2000
Hi there
I there anyone with an idea on how i can filter crosstab Report done in Crystal Report 8.5.. I'm trying to get data btw two dates for instance 05/01/04 and 05/31/04 but the following code doesn't do that. I'm using access 2000 database. Pls assist.

fMainForm.CrystalReport1.ReportSource = crptReport
fMainForm.CrystalReport1.ReportFileName = "F:OutGrowerReportsGLdelivered.rpt"
fMainForm.CrystalReport1.SelectionFormula = "Wdate" >= " & {CrossTabData.WDate} =" & "'" & CDate(DTPicker2.Value) & " AND Wdate" <= " & {CrossTabData.WDate}=" & "'" & CDate(DTPicker2.Value) & "'"
fMainForm.CrystalReport1.WindowState = crptMaximized
fMainForm.CrystalReport1.PrintReport
fMainForm.CrystalReport1.PageZoom (100)

or is there another better way to do this.

Crystal Report Record Selection
Hi there,

I am using VB6.0. My version of Crystal Report is 8.5. I have developed a label print report in CR first which had some prompt variable for user selection(Area). The report working fine stand alone in CR.
I had excluded the prompt before taking it in VB. Added the SQL selectin to limit the record selection. But it's bypassing the condition and selecting all the record. I can see the value of gsDivision is available.

Any help regarding this will be highly appreciated.

SQL Syntext in form :

rs.Open "SELECT * FROM tblLabel WHERE Division = " & "'" & gsDivision & "'", "ASLBLDEV"
Report.Database.SetDataSource rs


Regards.

Jay

Crystal Report Selection Formula
Hi,
how can i use left, right and mid ect. function in crystal report selection formula. for example:

CR.SelectionFormula = "mid({Custumer.CustCode},1,3)" ....

we can use mid funtion in VB and Substr function in SQL query, what in Selection formula?

thanks

Crystal Report Selection With Dates
Hi All

I've written an app in VB 6 and I'm using crystal reports 8.5. I have a order database where I want to search per stock item and then the movement between dates. The way I'm using it, is working fine on a PC with Crystal reports on, but as soon as I'm using it on a system where their is no crystal, it give me the following error.

Error in formula <Record_Selection> '{qryOrdersView.StockCode} = 'Endo605' and {qryOrdersView.Orderdate} >= #3/1/2004# and {qryOrdersView.Orderdate} <= #4/25/2004# A number,Currency amount,boolean or string is expected here.

The report selection formula i'm using is:
rptSelect = "{qryOrdersView.StockCode}= '" & strStock & "' AND " & "{qryOrdersView.Orderdate}>= " & strDateFrom2 & " AND " & "{qryOrdersView.Orderdate}<= " & strDateTo2 & ""


Could somebody perhaps help me with this

Many Thanks

Crystal Report Selection Formula
I have a problem with the selection formula to be used by crystal report 10. At first I just set one selection formula and it's work and now i want to used two selection formula but I do not know how to write it. Below is the code and the word highlight with red color is the formula i want to add.Can anyone teach me how..



Code:


Private Sub ListView1_DblClick()


ndLeaApprEmpNo = Trim(ListView1.SelectedItem.SubItems(3))
ndLeaApprLCode = Trim(ListView1.SelectedItem.SubItems(1))
ndLeaApprDt = Trim(ListView1.SelectedItem.SubItems(4))
'MsgBox ndLeaApprEmpNo & ", " & ndLeaApprLCode & ", " & ndLeaApprDt
Unload Me

Me.MousePointer = vbHourglass
Dim crApp As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Dim strSelectionfrm As String
Set crApp = New CRAXDRT.Application
Set Report = crApp.OpenReport("C:Program FilesMicrosoft Visual StudioVB98ProjectsLeaveAppLeaveForm2.rpt")


Report.Database.Tables(1).SetLogOnInfo "SQL", "tebrauteguh", "sa", "sa"
'{tblLeaveApp.EmpNo}='" & ndLeaApprEmpNo & "' -->another selection formula i want to add, how to combine both
strSelectionfrm = "{tblLeaveApp.Date_App}='" & ndLeaApprDt & "'"

Report.RecordSelectionFormula = strSelectionfrm
Report.DiscardSavedData
Form8.CRV.ReportSource = Report
Form8.CRV.ViewReport

Form8.Show
Form6.Hide
Me.MousePointer = vbNormal


End Sub

Printer Selection In Crystal Report 7
Dear Members
i am using crystal report 7
the problem is this that i have to select the printer From the user,kindly send me any solution.
Thanks

Selection Formula In Crystal Report
Hello!

I created a parameter in CR that takes a list of values and limits selection to them, e.g.,

{fieldvalue} in {?parameter}

So, this works if I passed in (A0111,B0121) as the parameter. If the field value is any of those two, it gets listed in the report.

The problem I have is that if I pass in (A011, B012), then CR treats that as (A011*, B012*), e.g., anything that starts with A011 is pulled in. I only want, to give an example, A011 only.

What other way can I approach this to avoid the problem? Thank you for your help.

-Bahman

Selection Formula In Crystal Report
Hi everybody,

Im using crystal 4.6 basically i want to select records using the selectionformula property of crystal control
something like.
cr.selectionformula=expr1 AND expr2 And expr3
i searched a lot but found that one expression is used for selection like
cr.selectionformula=expr1

i need to select records based on multiple conditions

Any help is welcome
Thanks
Kapil

Crystal Report Selection Criteria ?
Can crystal reports use a memo feild in it's search criteria? I just switched a text field to a memo field in my Dbase. Now am getting an error when I send the report search criteria from my VB program.

Crystal Report Selection Formula Problem
I want to pass the selection formula from the vb application which is using a crystal report control. I am using crystal report 8.5. now i have a list of 3000 items from which i am allowing the users to select the items he want. whatever items he is selecting is passed as the selection formula

"{inventoryreceiptdetail.itemid} in [" & SelectedItems & "]"

(where selectedItems contains comma seperated item codes)

The thing works fine when i select few items, but as soon as i select somewhere around 1000 codes (each code is of 10 digit) it gives me error 20515.

I tried putting that selection formula directly into crystal reports. it said, "too many items have been given to this array" . When i reduce the items, it works fine.

Can you help how to get the result even with large number of items

Crystal Report Selection On Date/Time
I'd like to pass a selection formula from VB6 to crystal reports to select those records that are before 6am on a certain date. Crystal generates a selection formula like this:

"{CoreINVY.Date Made} <= DateTime (2004, 04, 15, 00, 00, 00) and " & _
"{CoreINVY.Time Made} < DateTime (1899, 12, 30, 06, 00, 00)"

Do I need to do this the same way thru VB? I've tried the following, but it doesn't work:


Code:
"{CoreINVY.Date Made} <= '2004/04/14' and " & _
"{CoreINVY.Time Made} < 07:00:00)"

Why is Crystal using this DateTime function....and what's with the 1899?

Crystal Report Selection Formula (Urgent)
Hi Friends,

I am using crystal report to get the list of students registered between two dates. I am using vb6 as front end I've written following code to display report:


VB Code:
With crStudList        .Connect = strConn        .ReportFileName = App.Path & "
eportsStudentList.rpt"        .ReportTitle = "Student List"        .WindowTitle = "Student List"        .SelectionFormula = "{tblStudent.RegistrationDate}>=#" & dtpFrom.Value & "# and {tblStudent.RegistrationDate}<=#" & dtpTo.Value & "#"        .WindowState = crptMaximized        .Destination = crptToWindow        .Action = 1    End With


Where DtpFrom and and dtpTo are DtpPicker control which are used to select start and end date value. I've set its format to customFormat and Custom format i've set is "dd/MM/yyyy"

Its not giving any errors but if i give 01/02/2006 as start date and 28/02/2006 as end date, it should display only students' who have register in between these two dates but it displays all who registered in 02/01/2006 or 20/01/2006 or 08/01/2006.

plz help.

thx a lot

Crystal Report - Subreports Selection Formula
please help me

i need to change All the subreport selection formula , same as the main report. I Try this code but doesn't works.


'sel is string which the selection formula
Cr.SubreportToChange = ""
Cr.SelectionFormula = Sel
iSub = Cr.GetNSubreports
If iSub > 0 Then
For iCtr = 0 To iSub - 1
StrSub = Cr.GetNthSubreportName(iCtr)
Cr.SubreportToChange = StrSub
Cr.SelectionFormula = Sel
Next iCtr
End If

that code is working only if there is only one table in a main or subreport. that doesn't work in more table !

please help me , how to do this ?

thanks very much

Change Selection Formula Of Crystal Report
Hi There,
I wanna change the slection formula for selecting records of a report (created using Crystal Reports 7) from within the vb code. I'm Able to change the formula when i'm using a string field for condition.

When I Use

    crx.replaceselectionformula "{T01.F1}='AGL'"

everything works fine and i get the preview window of crystal reports.

But when I Use

    crx.replaceselectionformula "{T01.F0}=date(2004,11,18)"
No records are listed whereas i'm having 10 records with F0 as 11/18/2004

Here

crx - Crystal Reports ActiveX Control Object
T01 - Data table
T01.F0- F0 field of T01 (Data Type : Date/Time)
T01.F1- F1 field of T01 (Data Type : String/varchar(10))

Is the code i'm using correct. If not please tell me how to select records with the given date for T01.F0 Field

Date In Selection Formula Of Crystal Report
Hello,
I m setting the range of Dates in Selection formula of Crystal Report which is adjusted in VB. Code is like this :

Qry="{GateIn.InDate} >= '" & Format(DTPFrom, "mm-dd-YYYY") & "' " _
& "And {GateIn.InDate} <= '" & Format(DTPTo, "mm-dd-YYYY") & "' "

CryRep.ReplaceSelectionFormula Qry

Its not working properly. How can be its possible ?

Thanks

Crystal Report ,how To Discard A Selection Formula?
When i pass a selection formula from form to report it works as where clause , but if i want to undo the changes made by selection formula i.e. i want the original report without the effect of selection formula how to do it?

Thnaks to all u wonderful people in advance.

How To Use Record Selection Formula With Visual Basic 6.0 And Crystal Report 11.0
Hello Crystal Report 11.0 experts users,

I am first time trying to use CR11.0 with vb6.0. Previously I was using
CR8.5 and find no problems. Now, I am trying to use new VERSION OF
CR11.0 with VB6.0 and am strucked here.
I am using below code
Dim Report As New CRAXDDRT.Application
Dim RepApp As New CRAXDDRT.Report
CRViewer1.ReportSource = Report.OpenReport(NPath & "Service
Dash11.rpt")
RepApp.RecordSelectionFormula = "{DashBoard.Year}

06"

It gives me error message saying "Basic syntax is not supported in group
or record selection formula".

I have tried all possibilities and even searched in sites but not
finding any clue in this regard.

Kindly assit me in this regard.

Regards
arun

How To Enable Network Printer Selection Button At Crystal Report Viewer
Hi all

How to enable the network printer selection window button at crystal report viewer ?


Thanks for help

Data Selection In Crystal Reports
Hi expert here...

I have 2 question :

1>. I made VB-Access project with crystal reports 8.5. The reports
appear on the CR contains the whole data from the database. Could
anybody advise how to sort the data appear on the crystal reports, and
groupped, let say in monthly basis? So that the Report appear is not
expanded to the whole database, but in selected criteria, instead. Is
filtering should be created on the VB itself?
2>. When I press the print button on the report above, the printer
dialog box appear. But when I press OK, there's nothing happened. I had
tried to restarted the PC, but still not worked. Could anybody advise?

Rgds/
Teddy

Data Report Printer Selection
How do you set the printer for a data report at design time?

I want to attach code to a button that prints the report to a printer other than the default printer without showing the report.

Data Report Group With Record Selection
Hi,

I have a employee report grouped by divison and is working just fine. But how can I select employees based on their name?

So actually I want to have all employes called Peter% grouped by divison.

I'm using VB6 and DE.

Thanks for any help

What's Wrong With My Sql Statement (date Selection) In Data Report ?
Hi,
I have DtPicker1, DtPicker2 and cmd_OK on Form1.
I want to display report based on date selection.
this is code in Form1,


Code:

Private Sub cmd_OK_Click()
Report1.Show
End Sub

Private Sub Form_Load()
DTPicker1.Value = CDate("01/01/2000")
DTPicker2.Value = CDate("12/21/2000")
End Sub

and this is code in Report1,

Code:

Private Sub DataReport_Initialize()
Dim strSQL As String
Dim strTo As String
Dim strFrom As String
Dim oConn As New ADODB.Connection
Dim oRS As New ADODB.Recordset

oConn.CursorLocation = adUseClient
oConn.ConnectionString = DataEnvironment1.Connection1 oConn.Open

With Form1
strTo = .DTPicker1.Value
strFrom = .DTPicker2.Value
End With

Report1.Title = "From: " & strFrom & " To: " & strTo
strSQL = "(SELECT [courier query].* FROM [courier query]
WHERE date BETWEEN #" & strFrom & "# AND #" &
strTo & "# )AS Command4"

oRS.Open strSQL, oConn, adOpenForwardOnly 'line 1 Set Report1.DataSource = oRSEnd Sub

i've set the Connection1..but when i click the button, there was an error,
'Syntax error in union query'.

the error highlights on line 1.

any idea?
thanx..

What's Wrong With My Sql Statement (date Selection) In Data Report ?
Hi,
I have DtPicker1, DtPicker2 and cmd_OK on Form1.
I want to display report based on date selection.
this is code in Form1,

Code:Private Sub cmd_OK_Click()
Report1.Show
End Sub

Private Sub Form_Load()
DTPicker1.Value = CDate("01/01/2000")
DTPicker2.Value = CDate("12/21/2000")
End Sub

this is code in Report1,

Code:Private Sub DataReport_Initialize()
Dim strSQL As String
Dim strTo As String
Dim strFrom As String
Dim oConn As New ADODB.Connection
Dim oRS As New ADODB.Recordset

oConn.CursorLocation = adUseClient
oConn.ConnectionString = DataEnvironment1.Connection1 oConn.Open

With Form1
strTo = .DTPicker1.Value
strFrom = .DTPicker2.Value
End With

Report1.Title = "From: " & strFrom & " To: " & strTo
strSQL = "(SELECT [courier query].* FROM [courier query]
              WHERE date BETWEEN #" & strFrom & "# AND #" &
              strTo & "# )AS Command4"

oRS.Open strSQL, oConn, adOpenForwardOnly 'line 1
Set Report1.DataSource = oRS
End Sub

i've set the Connection1..but when i click the button, there was an error,
'Syntax error in union query'.

the error highlights on line 1.

any idea?
thanx..

Storing And Retriving Images From Access Databse Through VB Data Report Or Crystal Report
hi friends
    i have a problem that i have a database of some 8000 students in which there is a field called "photo" which stores the photograph. it is stored as BLOB field. now i want to retrive it in my report. i'm getting very much difficulties in it. can i have a help from master minds to resove the same. it will be very much helpful to me.
    my e-mail id: nnpatwa@yahoo.com
  ur suggestions r welcome. anybody can mail me. hoping for the best.

Help With Report - Easy One For People Familiar With Crystal Reports, Data Report Et Al
Till date, I have worked only with the Data Report
Utility that is dovetailed with the Data Environment
Designer, for the purpose of generating reports in my
applications. Shamefully, I am completely nescient of
Crystal Reports. I would want someone to kindly take
time to read my query and provide me a clue as to the
solution. The problem, I surmise, would be
interstingly simple for the creed of programmers who
are familiar with reporting softwares like Crystal
Reports.

I have a table in MS-Access 2000 and its called
'Holidays'. The Holidays table has the following
fields:

Data Anaysis And Report Generation Depending Upon User Selection
I developed a software for a client who recently asked me to add a feature for Data Analysis. He wants that Reports should be generated depending on his record selection criteria. He wants to select fields from tables and the Report should be generated depending upon his selection. I am puzzled as to how to add this feature in VB 6 so that a client can retrieve desired information from Access XP database. The problem is that client has no knowledge of SQL and I have to apply any technique with which even a novice can retrieve any information.
Is there anything to do with DataWarehouse?

Data Analysis And Report Generation Depending Upon User Selection
I developed a software for a client who recently asked me to add a feature for Data Analysis. He wants that Reports should be generated depending on his record selection criteria. He wants to select fields from tables and the Report should be generated depending upon his selection. I am puzzled as to how to add this feature in VB 6 so that a client can retrieve desired information from Access XP database. The problem is that client has no knowledge of SQL and I have to apply any technique with which even a novice can retrieve any information.
Is there anything to do with DataWarehouse?


How To Create A Selection Criteria With VB6 Data Environment Report Designer
Does anyone know how to create a selection criteria in the VB6 data environment data report designer?

I want to select all the entry ID's from an access table based on a variable I alerady have populated.

Thanks!

Bob

Crystal Report 6.0 Troubles To Get Data In The Report With Win 2000 Environement
I have migrated and old VB5 application that was running perfectly on windows 98 and millenium to Windows 2000.
All the application is working fine, but sometimes when a report (crystal Rep. 6.0) is called from the vb application, the report comes blank although the temporary table generated for the report is correctly populated in the access 97 database.
Restarting the application and re-asking the report often show the correctly filled data.
 
It sounds like Crystal report encouter troubles to read the database in windows 2000 although exactly the same process was used for the former windows version. All the software are the sames :
 
Visual Basic 5.0
Crystal report 6.0 
MS-access 97 Database
windows is now windows 2000 SP2
 
Has anybody an idea to help me ?
 
Thank you !
 
Denis

How To Know The User Selection Export File Format Based On Microsoft Data Report
Hi all,

i am using microsoft data report in VB 6 , how to i get the user selection file format (open the export file dialog box) he or she wish to export the file for example to EXCEL. or is any window API to detect the file selection from the file dialog box.

after when the user select *.xls for export i wish to do other application processing , therefore is there any other to detect or know the file format selection from the file dialog box ?


Private Sub DataReport_Initialize()

rptDemo.ExportFormats.Add _
   Key:="ExcelReport", _
   FormatType:=rptFmtText, _
   FileFormatString:="Excel (*.xls)", _
   FileFilter:="*.xls"

End Sub

Private Sub DataReport_AsyncProgress(ByVal JobType As MSDataReportLib.AsyncTypeConstants, ByVal Cookie As Long, ByVal PageCompleted As Long, ByVal TotalPages As Long)

Dim iCount As Integer
Dim i As Integer

'iCount = rptDemo.ExportFormats.Count
'
'For i = 1 To iCount
' Debug.Print rptDemo.ExportFormats(i).FileFormatString
'Next

End Sub

 

How To Make A Data Report In VB(not Crystal Report)
Hello guyz,
i want to make a data report in vb, not a crystal report. Plz help me guyz. Itz very important, my jobs gonna depend on it. Plz help.

Calling Data Report In Crystal Report
Hi all,
Is there any way by which I can insert data report in crystal report viewer?
Actually one of the client wants some features which are possible in crystal report viewer like email etc., only for that reason I dont want to create new reports from scratch. If there is any way then pls let me know. It is very urgent.

Any help is appreciated.

Crystal Report Vs Data Report
Hi All,

I just want to build a report which show the data in group pattern, then "Crystal Report" / "Data Report" which is the better tool to doing report.

Thanks
Aston

Data Report/Crystal Report
Good Day!!

How can I set a data on my report defending on the conditions that the users will pick in filtering the data he/she wants to preview.


Pls help. Either in Data Report or Crystal Report.
TY in advance.

Data Report, Crystal Report, Or Something Else...
Hi,

I'm going to create a client-server sales and inventory application. It would generate reports/receipts like sales invoice, purchase orders, history and so forth. What is the best reporting tool, the most feasible, and their pros and cons?

I was thinking of Data Report, though I haven't tried it because I've been using Crystal for my reports. One disadvantage of this that I know is the licensing...so I though of generating reports using PHP...although report previews would be generated via a web browser...but it's ok as long as the client says it's ok...

So guys...please help me decide...

Thanks a lot!!!

Help--&gt;How To Get Data From Crystal Report In VB
I'd like to get Crystal report result and use it in vb. Any idea how to do it? Thanks in advance!

All Data Not Displaying In Crystal Report
Hi,

I am using Crystal report 8.0 to create a report i.e. Broker mailing label report. The problem is that when I use a search in my Select Expert like "Brokers in City?" etc. I only end up with 1 or 2 pages when actually much more data than that that should be pulled by the search. The way I could verify this is that if I export the report in Excel, I can actually see all the data pulled by the search which is around 20 pages. however, this doesn't display in Crystal Reports. However, I can see all the data in Crystal Reports if I don't use any select expert criteria at all and run the report with the entire system's data....

Has anyone ever experienced this...what could be causing this..

Thanks

Crystal Report Data Alignment
i want to display record horizantly not verticaly for example
i hav a field area by default its look like as:
Area
1
2
3
.
.
i want it display as:

Area 1 2 3 . ....

plz help me, Thanx

Displaying Data In Crystal Report
Currently i am using MS access database which is stored in a server. I would like to know if there is anyway i can retrieve data from the database which is located in the server and display it on the client application using crystal report? I will be greatful if you are able to provide a short sample code on this problem. Thanks.

Crystal Report Data Not Refreshing
Hello,
I am trying to write a VB 5.0 program with Crystal 8.5 that looks at Oracle 8.05 data. I would like for the report to use a new recordset as data, rather than the original recordset that was used when the report was created. The following code runs, but continues to return the same data as when the report was created. Your help is much appreciated...here is the code.




Dim appl As New CRAXDRT.Application
Dim rep As New CRAXDRT.Report
Dim AdoRs As New ADODB.Recordset



AdoRs.Open "Select subjects.* from subjects where jid = " & 30, "Driver={Oracle ODBC Driver};" & _
"Dbq=Name;" & _
"Uid=User;" & _
"Pwd=PSW"
Set rep = appl.OpenReport("d:ivrscrystalreportssubjects2.rpt", 1)


rep.Database.SetDataSource AdoRs
rep.ExportOptions.DiskFileName = "c:TestExport15.doc"
rep.ExportOptions.DestinationType = crEDTDiskFile 'or use crEDTDiskFile
rep.ExportOptions.FormatType = crEFTWordForWindows 'format changes for .rft, word, PDF, etc
rep.Export False
rep.SaveAs "d:ivrscrystalreportssubjects15.rpt", cr80FileFormat

AdoRs.Close
Set AdoRs = Nothing
Set rep = Nothing
Set appl = Nothing
End Sub

Crystal Report In Vb - Data Not Refresing
I have created a report in Crystal Reports having oracle as back end. While linking in VB, after we make entry, the data is not refreshing. Everytime I have to go to crytal report to refresh it. Anybody can help me out to solve this problem.

Data Environment And Crystal Report
Hi i have built a report using the data environment but then added new table to database that i want to import into report also but i dont know how to 'refresh' the data environment to see the new table.

Crystal Report Data Manipulation
I made a simple CrossTab report and I would like to apply a formula on each value of the CrossTab. These values are store in a database under a certain unit and I need to display them under another unit.

Ex: Let's say that the value in the database are temperature and they are store in Celcius. I would like to display the report in Fahrenheit. I need to apply a formula on each data to display them in Fahrenheit.

Thanks

Crystal Report Does Not Refresh Data
I always create report in Crystal Report first and after that I add existing report into my VB application. This my code works always fine but sometimes I can't refresh data from my query. So, report continue pulling all data originally made in Crystal Report.

Does anybody have idea why I have this problem???

myCmd.CommandText = sql
Set rs = myCmd.Execute
myReport.Database.SetDataSource rs
myReport.CRViewer91.ReportSource = myReport
myReport.CRViewer91.ViewReport
myReport.Show

Crystal Report Handle Data
I am using VB6 + Crystal Report 10.

Normally crystal report can direct link to our database to display record in report. But if I do not want crystal report direct link to my database, means I will process my data then pass it to crystal report. My question is "How can I pass those records to crystal report"?

In Microsoft .NET environment, I can do that using "DataSet". It means I will process my data and store it to DataSet, after that I will pass this DataSet to crystal report. Crystal Report will retrieve records from DataSet and display in report. But in VB6 there is no dataset, so what can I do?

Thank you

Crystal Report-Calculating Data From Sub Rpt
I have a report which contains a sub report. I need to take the total from the main report and divide it from the total in the subreport. I thought to just create variables to transfer the data back and forth however it recalculates the variable amount to the values in the sub report.

I do not know crystal well, am I declaring in the worng place.

and

Crystal 9, ODBC link to A DB, no code, rpt was oroginally built with wizards.

Thanks In advance

Using Subreport Data In Crystal Report
I have a crystal report with a subreport in it. Is it possible to use data from the subreport to calculate a value that is displayed in the main report?

Crystal Report Not Showing Data
Hi All
I am new to VB and CR
1>When I create a report on my system, it shows the data in preview but when i copy rpt file to user system, it does not show any records.
Is anything related to "Save Data with Report" under File Menu in CR?
2>I am using a table from a mdb file which is on d:package directory on my system. On user system, CR gives error if i dont create a folder named "package" on d:-drive.
How to make CR use MDB from app.path?

The code is as under
CrystalReport1.DiscardSavedData = True
CrystalReport1.Destination = crptToWindow
CrystalReport1.Action = 1

pls reply soon
thanx

Copyright 2005-08 www.BigResource.com, All rights reserved