Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: LuhanaPosted on 2009-08-16 at 13:15:26ID: 25110289
'make a module and write code or copy this
Public cr As New CRAXDRT.Application
Public rpt As CRAXDRT.Report
Sub OpenReportFile(FileName As String) .GroupSele ctionFormu la = "" ula = ""
rptFile = FileName
fn= App.Path & "\Reports\" & rptFile & ".RPT"
Set rpt = cr.OpenReport(fn, 1)
rpt.DiscardSavedData
'rpt
'rpt.RecordSelectionForm
End Sub
Sub showReport()
For i = 1 To rpt.Database.Tables.Count
'cr.LogOnServer
On Error Resume Next
rpt.Database.Tables(i)
'rpt.Database.AddOLEDBSour
Next
'rpt.ReportTitle = ""
With frmReportsView.creport
.EnableAnimationCtrl = True
.EnableCloseButton = True
.EnableExportButton = True
.EnableNavigationContr
.EnableProgressControl
.EnableZoomControl = True
Do While .IsBusy 'ZOOM METHOD DOES NOT WORK WHILE
DoEvents 'REPORT IS LOADING, SO WE MUST PAUSE
Loop
.Zoom 1200
.ReportSource = rpt
.EnableRefreshButton = True
.ViewReport
End With
'frmReportsView.Captio
frmReportsView
'clea
Set rtp = Nothing
Set cr = Nothing
End Sub
Sub setReportMultiRecords(parm
txt = App.Path & "\Reports\" & rptFile & ".RPT"
Set rpt = cr.OpenReport(txt, 1)
rpt.DiscardSavedData
'parm = Client_ID
Do Until rpt.ParameterFields.GetIte
rpt.ParameterFields.GetIt
Loop
'Delete all the original parameter values from the parameter picklist.
'If you want to keep the orginal parameter values in the parameter picklist, comment out this loop.
Dim adoRs As New ADODB.Recordset
'Set adoRs.DataSource = objConn
Call adoRs.Open(parmSourceSQL, objConnection, adOpenDynamic, adLockBatchOptimistic)
'Cre
adoRs.MoveFirst
'Move to the first record so you don't miss any records in the loop
Do Until adoRs.EOF = True
'Only loop until the end of the recordset
rpt.ParameterFields(2).Add
'Add each value of the Customer ID field in our recordset to the parameters DEFAULT list
adoRs.MoveNext
'Move to the Next Record in our field
Loop
End Sub