Very perplexed newbie- HELP!! 
Author Message
 Very perplexed newbie- HELP!!

Hi Alison,
    Create your report with Crystal Reports Designer and save the .rpt file.
In VB, add the Crystal Report component to your form and then use code like
the following:
    CrystalReport1.FileName = "c:\MyReport.rpt"
    CrystalReport1.Destination = crptToWindow
    CrystalReport1.PageFirst  'I'm not sure what this does, but, I found it
was better to include it.
    CrystalReport1.Action = True

Bob Holmes


Quote:
> Hi guys

> Sorry if this question is naive but, I have installed the
> Crystal ocx which is shipped with VB 6.0. I also have
> Crystal reports 8.0 installed on my PC. As part of my VB
> application, I want to display a Crystal report- I'm just
> not sure what to do.

> Thanks

> Ali



Sat, 21 Aug 2004 02:13:43 GMT  
 Very perplexed newbie- HELP!!

In the below you really only need two commands:

CrystalReport1.FileName = "c:\MyReport.rpt"
CrystalReport1.PrintReport

Quote:
>    Create your report with Crystal Reports Designer and save the .rpt
file.
>In VB, add the Crystal Report component to your form and then use code like
>the following:
>    CrystalReport1.FileName = "c:\MyReport.rpt"
>    CrystalReport1.Destination = crptToWindow
>    CrystalReport1.PageFirst  'I'm not sure what this does, but, I found it
>was better to include it.
>    CrystalReport1.Action = True



Sat, 21 Aug 2004 06:28:39 GMT  
 Very perplexed newbie- HELP!!
Hi Bob,



[...]

Quote:
>     CrystalReport1.FileName = "c:\MyReport.rpt"
>     CrystalReport1.Destination = crptToWindow
>     CrystalReport1.PageFirst  'I'm not sure what this

does, but, I found it
Quote:
> was better to include it.
>     CrystalReport1.Action = True

[...]

With CR8 ????

Private Sub showReport(sReportFile as string)
On Local Error GoTo errReport
Dim crApp As New CRAXDRT.Application
Dim crRep As New CRAXDRT.Report
Set crRep = crApp.OpenReport(sReportFile, 1)
CRViewer1.ReportSource = crRep
CRViewer1.ViewReport
Set crRep = Nothing
Set crApp = Nothing
Exit Sub

errReport:
Set crRep = Nothing
Set crApp = Nothing
MsgBox "Fehler: " & Err & vbCrLf & Error(Err), 16
End Sub

W. Wolf



Sun, 22 Aug 2004 21:14:23 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need help with Perplexing Outlook Object Question

2. Perplexing Problem - Need Help

3. <newbie>HELP!</newbie>

4. Perplexing Error Messgae

5. Perplexing date rearrangement

6. Perplexing Problem (Firstbasic)

7. Command () and Windows 2000 ( perplexed )

8. perplexing scrollbar problem

9. A truly perplexing problem

10. Perplexing Popup Menu Problem

11. Encryption Problem (Very Perplexed)

12. A perplexing dilemna

 

 
Powered by phpBB® Forum Software