Solved

Printing from Crystal Reports 9 within MS Access

Posted on 2003-11-21
18
1,488 Views
Last Modified: 2007-12-19
In previous versions I used to compile reports for distribution.   These compiled reports were accessed via MS Access forms and allowed run-time perameters.   Version 9 does not allow this.
Is there a way in which I can achieve a similar result, and if there is what files would also need to be ditributed.
I urgently need to get help on this as my job depends on it (I recommended an upgrade to 9 and so far as the boss is concerned, it doesn't work)
Perhaps there is a third party product that could do the job.
Bring back the compiler !!!

Many thanks

Peter Stevens

0
Comment
Question by:Fourte
  • 7
  • 4
  • 3
  • +3
18 Comments
 
LVL 7

Expert Comment

by:mnye
ID: 9799467
Peter,

What about export formats? PDF, Excel, RTF, HTML?

Also, what version of 9 did you buy, Professional, Developer or Advanced? If you have any version other than Professional than you have lots of options to automate this process utilizing a web, VB or .Net application.

hth
matt
0
 

Author Comment

by:Fourte
ID: 9799515
Version was Professional
I need to do a straightforward print but with option of inserting run-time parameters

Peter
0
 
LVL 7

Expert Comment

by:mnye
ID: 9799543
Peter,

You'll need Developer.  That includes the Crystal Runtime Engine, RAS (Reports Application Server)  and access to the API which is what you need to insert runtime parameters (http://www.crystaldecisions.com/products/crystalreports/editions.asp).

hth
matt
0
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9799586
Seems that you have the wrong version (Developer or Advanced Edition can):

Fragment from CR-Site:

Integrate reports into thick-client applications

Crystal Reports Developer and Advanced Editions provide high productivity report design technology and powerful developer tools for integrating reporting capabilities into thick-client applications. Two key licensing rights apply:

As with previous versions of Crystal Reports, you can integrate 750+ royalty-free report viewing, printing and modification APIs into thick-client applications and deploy and/or redistribute your applications at no extra cost (known as "free runtime"). While there is no additional charge for redistributing these APIs, your distribution of the files is subject to terms and conditions contained in the Crystal Reports 9 License Agreement (ZIP – 44 KB).
Crystal Reports 9 also offers a powerful set of report creation APIs to let end users create and modify reports from within your thick-client application. If you use these APIs, you must purchase a Report Creation API License for each named user that you deploy and/or redistribute your application to.

Once, I used CR 9 Advanced in combination with a VB-Program. Created a package with also the CR Runtime, and it just worked fine!
0
 

Author Comment

by:Fourte
ID: 9799669
Thanks for the advice but I am on a shoestring and have spent out so much (personally) that I am now looking for a low cost solution (if there is one)
Crystal Decisions Technical Support  give an example - rdc_vba.exe which is exactly what I need.   This Visual Basic application is for use with version 8.5 and higher of Crystal Reports.   Unfortunately it is written in VBA and is run-time only
Any comments how this could be re-written - or by whom?   There would be a very good market for such a utility as you know.

Peter
0
 
LVL 7

Expert Comment

by:mnye
ID: 9799746
RDC is the older version of RAS. as far as I know you cant run CR 9 reports with the RDC you need RAS. If you want the runtime capability, you may have to shell out the extra money for Developer edition. sorry to be the barer of bad news.

good luck
matt
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 9800061
Look here for some inexpensive viewers with the capability to do what you want.

http://www.kenhamady.com/bookmarks.html

mlmcc
0
 
LVL 13

Expert Comment

by:EwaldL
ID: 9800620
mnye, there is no problem whatsoever to view a cr 9 report with the rdc. just update the references from
craxdrt.dll to craxdrt9.dll
and crviewer.dll to crviewer9.dll

so Fourte's best bet would be to write his (her?) own application using the rdc using cr 9 developer or advanced.

Fourte, let us know if you have any questions on this!
0
 

Author Comment

by:Fourte
ID: 9802279
my problem is that I am not knowledgeable enough to attempt to write something like this.
If someone would be prepared to have a look at the example and write a module to do the job I would be prepared to pay (a small amount)
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Expert Comment

by:EwaldL
ID: 9802452
maybe these steps will give you a good headstart. it's a very basic example without any error checking though
Also the following could be helpful for you.
http://support.crystaldecisions.com/communityCS/TechnicalPapers/rdc9_tutorial.pdf.asp
http://support.crystaldecisions.com/communityCS/TechnicalPapers/rdc9_browser.exe.asp
http://support.crystaldecisions.com/communityCS/TechnicalPapers/rdc9_deployment.pdf.asp
http://support.crystaldecisions.com/communityCS/TechnicalPapers/apps_rdc.pdf

- Open VB 6
- "File" -> "New Project" -> "Standard Exe"
- "Project" -> "Add Form" -> "Form"
- "Project" -> "References" -> "Crystal Reports 9 ActiveX Designer Runtime Library" -> "OK"
- "Project" -> "References" -> "Microsoft Common Dialog Control" -> "OK"
[do NOT select "Crystal Reports 9 ActiveX Designer Design and Runtime Library"]
- "Project" -> "Components" -> "Controls" -> "Crystal Reports Viewer Control 9" -> "OK"
- "View" -> "Toolbox"
- Place the "CRViewer9" from the toolbox onto "Form2"
- Place a textbox and 2 buttons on Form1
- Place the "Common Dialog" form the toolbox onto "Form1"
- Use this code for Form1
Option Explicit
Dim crApplication As New CRAXDRT.Application
Dim crReport As CRAXDRT.Report

Private Sub Form_Load()
  Text1.Text = ""
  Command1.Caption = "Select Report"
  Command2.Caption = "View Report"

  CommonDialog1.InitDir = App.Path
  CommonDialog1.Filter = "Crystal Report Files (.rpt)|*.rpt"
 
  Form2.CRViewer91.EnableExportButton = True
End Sub

Private Sub Command1_Click()
  CommonDialog1.ShowOpen
  Text1.Text = CommonDialog1.FileName
End Sub

Private Sub Command2_Click()
  Set crReport = crApplication.OpenReport(Text1.Text)
  crReport.DiscardSavedData
  Form2.CRViewer91.ReportSource = crReport
  Form2.CRViewer91.ViewReport
  Form2.WindowState = vbMaximized
  Form2.Show
End Sub

Private Sub Form_Unload(Cancel As Integer)
  Set crReport = Nothing
  Set crApplication = Nothing
End Sub

- and this code for Form2
Option Explicit

Private Sub Form_Resize()
  CRViewer91.Top = 0
  CRViewer91.Left = 0
  CRViewer91.Width = ScaleWidth
  CRViewer91.Height = ScaleHeight
End Sub
0
 

Author Comment

by:Fourte
ID: 9802543
Now that's what I call realy good help !!

I have never gone so far as to use VB in CR so I have got to learn how to do so, and if I can find a way of inserting the facility to select a report file it would be the solution.

Am now going to research the sites you gave me.

If I can make a small donation please e-mail peterstevens@btconnect.com

Thanks for everything EwaldL, mlmcc, mnye and wsteegmans, I didn't know such good help was available - now I can perhaps start to learn through your site, although having had two strokes that damaged my brain I find it very hard going.

Thanks, thanks, thanks !!!
0
 
LVL 13

Accepted Solution

by:
EwaldL earned 500 total points
ID: 9802604
no worries fourte, we are glad to help! the above instructions i had posted already allow the end user to select a report file. so hopefully it will achieve what you are looking for!
0
 

Author Comment

by:Fourte
ID: 9817429
Hi EwaldL
Thanks for previous help - BUT!!
I do not have VB (any version) could you tell me how I could put the code directly into Access?
Your help is very much appreciated
0
 

Author Comment

by:Fourte
ID: 9818254
In the absence of EwaldL is there any kind person who can help me with putting the code directly into Access?
I am at my wits end and ready to end it all with a rusty safety razor if I can't get a good nights sleep tonight

Thanks to all
0
 
LVL 7

Expert Comment

by:mnye
ID: 9818285
from Access click on "Reports" section, then click "Create report in Design view", then right click on the new report and select "Build Expression",  select "Code Builder" fro mthe resulting pop up box and from there you can paste in your code.  for better help with access you should post a question in the Access forum.

hth
matt
0
 

Author Comment

by:Fourte
ID: 9818315
Cheers Matt
0
 
LVL 1

Expert Comment

by:Jimby_Aus
ID: 9991781
I just tried the same call to the RDC in VB.Net, the same thing happens - nothing.

        Dim moCrxApp As New CRAXDRT.Application()
        Dim moCrxView As New CRVIEWER9Lib.CRViewer9()

        Dim objReport As New CRAXDRT.Report()

        objReport = moCrxApp.OpenReport("C:\Temp\TestReport.rpt", 1)

        moCrxView.ReportSource = objReport
        moCrxView.ViewReport()

Is the RDC supposed to be licensed?  How does it know its registered?
0
 
LVL 1

Expert Comment

by:Jimby_Aus
ID: 9991785
arghh, wrong window :)
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now