Question

RAS 9 Printing issue

Asked by: Jerre

I have a few issues when printing ras 9 web repors.

1) Is there a way to get around all the different internet explorer prompts.
    ( printing a report is just going to export it to adobe acrobat reader, and then you have to maually print via adobes file print menu)

2) Is there a way to change the appearance of the toolbar buttons (print,export,refresh,...)
   created by the ras server when showing a report.

3) Is there a way to change the default page range option to ALL PAGES instead of FROM PAGE 1 TO 1 in the first dialog box ?

Any suggestions are welcome !

Thanks in advance


This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-05-15 at 03:29:37ID20617080
Topic

Crystal Reports Software

Participating Experts
6
Points
115
Comments
23

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

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.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. RAS
    HOW TO ACCESS MY NETWORK FROM REMOTE END THROUGHDIALUP. I KNOW THROUGH RAS(REMOTE ACCESS SERVICE) IN WINNT WE CAN DO THIS.BUT I WANT FULL DETAILS REGARDS ARUN
  2. Toolbars Disappear! in Adobe Acrobat Reader
    Hi, I'm trying to print a .pdf on windows 2000 w/ adobe acrobat reader 5.1 17/9/2002 When I open the document all toolbars disappear. I can right click and navigate the pages but if the document is distributed people won't know this. And its also impossible to print. Wh...
  3. No commenting toolbar in Adobe Acrobat Reader 6
    I cannot get commenting to work on Adobe Acrobat Reader 6. I don't have the commenting toolbar! Commenting is a new feature with Adobe Acrobat Reader 6.0. However "my" Adobe Acrobat Reader 6.0 doesn't seem to have it! In the online help of the Reader it is explain...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

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

Answers

 

by: mlmccPosted on 2003-05-15 at 06:45:24ID: 8533108

Q1.  Why are you exporting to PDF rather than printing the report directly?

Q2.  I know of no wayto change the appearance of the toolbar.  This question or one like it has been asked and as I recall no satisfactory answer was found.

Q3.  How are you calling the report?

mlmcc

 

by: JerrePosted on 2003-05-15 at 07:00:07ID: 8533236

1)When using the report application server 9 , and you click the print button , the report is always exported to a PDF file , and then you have to print it from there.
It is the builtin way crystal decicions provided.

I don't mind this so much... the one thing I do mind is the amount of internet explorer prompts before the report opens up in adobe acrobat reader.

2) the toolbar is only a bit of html code as well as the rest , so I was hoping someone could maybe tell me where this was kept (html file , resource dll , ...?)

3)I am using the report application server ( web reports ).

 

by: ladylinetPosted on 2003-05-15 at 16:54:25ID: 8537271

1) You can make your own export/print button that will stream pdf directly to a new window. Yes, you will still have to select print button in that window, but you will skip all that annoying questions about open/save unknown file etc.
2) Toolbar images are under:
 c:\Program Files\Common Files\Crystal Decisions\2.0\crystalreportviewers\images\toolber
3) That's what I would like to know very much...
 
  Do you use asp or .NET?

Lady Linet

 

by: JerrePosted on 2003-05-19 at 06:25:46ID: 8544401

Lady Linet,

I am using ASP.

Is it possible to give me some more help on the annoying questions open/save problem ?

Thanks

 

by: ladylinetPosted on 2003-05-19 at 14:55:12ID: 8547284

Make your own print or export button (regular submit in asp), and use this code for export:
 If you encounter problems with missing constants, they are in Programm Files\Crystal Decisions\Report Application Server 9\rasconst.vbs.

'------------------------------------------------------------------------------
' Name: ExportReport
' In: /
' Out: /
' Effect:
'---------------------------------------------------------
Function ExportReport(strExportFormat)
  Dim i,j
  Dim oPrintOutputController
  Dim strExt, strMime, strFormat, iFormat, strEFileName
  Dim oByteArray
  Select CASE (UCASE(strExportFormat))
   Case "PDF" : iFormat = crReportExportFormatPDF
        strMime = "application/pdf"  
        strExt = ".pdf"
   Case "MSWORD" : iFormat = crReportExportFormatMSWord
           strExt = ".doc"
           strMime = "application/msword"  
   Case "MSEXCEL" : iformat =  crReportExportFormatMSExcel
              strExt = ".xsl"
              strMime="application/vnd.ms-excel"                                                                                          
   Case "MSEXCELDATA" :
      iformat =  crReportExportFormatRecordToMSExcel
        strExt = ".xsl"
        strMime="application/vnd.ms-excel"                                                                                   
 Case "TEXT":            
                iformat =  crExportFormatText
      strExt = ".txt"
      strMime="text/plain"
   Case "CSV"            : iformat =  crReportExportFormatCharacterSeparatedValues
                     strExt = ".csv"
                     strMime="text/plain"                                                         
   Case Else            
            iFormat = crReportExportFormatPDF
            strExt = ".pdf"
            strMime = "application/pdf"                                                                                                          
  END Select
  '---- Add a custom header for an inline file type with a default file name  
        Response.Clear  
   Response.AddHeader "content-disposition", "filename=export" & strExt
   Response.ContentType = strMime  
 
  Set oPrintOutputController = rcDoc.PrintOutputController
  Set oByteArray = oPrintOutputController.Export(iFormat)
 
  '----- Send the bytearray to the browser through the Response object, used
  '----- detachArray method for quicker tranfer of data
  Response.BinaryWrite oByteArray.detachArray
  ExportReport = True
End Function

 

by: JerrePosted on 2003-05-20 at 02:09:34ID: 8549312

Can I not put that code to behind the current ras reportviewer , and have it triggered when the existing print button is clicked instead of the current doexport() ?

If not ... how can I add a new print button to the existing ras viewer page ? where can I find the code behind the current ras viewer , and can I ammend it ?

Thanks so much for all this help !

 

by: ladylinetPosted on 2003-05-20 at 09:47:41ID: 8551909

I wish to say yest to that, because I couldn't find how to attach my code to events on toolbar (and how to detect them either). So this is my attempt to duplicate crystal behavior by having my own button (plain submit), because I couldn't find anything in documentation about events.
 You can not add your button to toolbar, I made my own as inlcude file on top of toolbar, so it's look like another toolbar with just one button.
 This way above allows export of whole document only. If you happen to find out how to specify page range, let me know :)))

Good luck.
Lady Linet

 

by: JerrePosted on 2003-05-30 at 08:33:33ID: 8614957

No Luck!

I am sorry to have to bother you again.
But after trying everything I know , I can still not export a report showing with ras 9 to a PDF file on the screen the way you have tried to explain me.
Is it possible to send me a copy of the include files you used to create the toolbar , what action does the submit button have ?
How does it know what report to print , where does the exportreport code go ? where is the exportreport code called ?

Is the variable 'rcDoc' the Crystal reports Client document ?

Thanks so much for you help !

Regards,
Jeroen.

 

by: ladylinetPosted on 2003-05-30 at 10:25:31ID: 8615886

Uh... first, did you manage to view your report in RAS?

1.  rcDoc is ReportClientDocument from RAS.

  Set objectFactory = CreateObject("CrystalReports.ObjectFactory.2")
  Set rcDoc = ObjectFactory.CreateObject("CrystalClientDoc.ReportClientDocument")

  rcDoc.Open "c:\inetpub\wwwroot\rpt\a.rpt"

 Button is simple submit, that I intercept after I create rcDoc, login to db and pass parameters, but before I call processHTTPRequest, like this...

  blnExport = False
  strExportFormat = Request.QueryString("Export")
  If strExportFormat > "" Then
   blnExport = True  
  End IF

IF blnExport = True Then
      ExportReport(strExportFormat)
Else
%>
 <!-- #include virtual="/Includes/exportbutton.asp" -->
<%
'---------------------------------------------------------
' Call HTML Viewer
'---------------------------------------------------------
 setViewerParameters(viewer)
 viewer.ProcessHttpRequest Request, Response


 All that is export button is doing is to attach to the querystring parameter called export, with value from dropdown, like 'PDF', or 'MSWORD'...

HTH,
Lady Linet
p.s. can you open another question for this...?

 

by: wtf666Posted on 2003-12-10 at 02:30:37ID: 9911118

Hi

i am also intrested in knowing the way we can show all pages of the cr9 using scroll .. by default we can do it by using the navigation bar by pressing next , next button ....

Please let me know Is it possible to show al pages together .. with definately a scroll bar .?

I am using rdc for cr9 ...  

Regards
Ade

 

by: ladylinetPosted on 2003-12-10 at 17:51:05ID: 9917508

Can you open new question for that?

Lady Linet

 

by: wtf666Posted on 2003-12-10 at 22:26:38ID: 9918480

ladylinet

please give the answer here i'll give you the points if it works ..

regards
Ade

 

by: matchbx27Posted on 2003-12-11 at 07:01:04ID: 9920551

I feel your pain wtf666.  I am having the same problem.  I would like to give the user the choice of opening the report in PDF format directly or opening in Crystal Report format.

 

by: ladylinetPosted on 2003-12-11 at 11:14:32ID: 9922456

Sorry, I'm not using Rdc, that's why I've told you to open new question - more people can help you if you open new question. I can help you only with RAS (Report application server on web).

Lady Linet

 

by: wtf666Posted on 2003-12-11 at 11:56:02ID: 9922782

oright ...
Thanks

Ade

 

by: matchbx27Posted on 2003-12-12 at 12:56:47ID: 9930900

wtf666,

I am currently working with Crystal Tech Support for a better method but here's what will work (at least as a short term solution)

instead of assigning the ClientReportDocument to the CrystalReportViewer

do this

Dim strPath as string = "c:\winnt\temp\"
dim strName as string =  rptClientDoc.DisplayName & ".pdf"

rptClientDoc.PrintOutputController.Export(CrReportExportFormatEnum.crReportExportFormatPDF).Save(strPath & strName, True)

Response.Redirect(strPath & strName)


I hate the fact that I am saving the file to the local hard drive before displaying it but this is the only way I can get it to run.

Thanks,
matchbx

 

by: TO_raptorPosted on 2004-03-30 at 16:50:27ID: 10719796

In C# using the RAS model the PrintController class method Export is a member of the Controllers in the ReportAppServer namespace.
This function has a second parameter. Does anyone have any idea what this parameter is for and what the correct values for it are?

Thanks very much

Gary

 

by: TO_raptorPosted on 2004-03-30 at 17:10:29ID: 10719946

Follow up!!!!! i used the code by matchbx27 to write a little final ditch effort pdf load code and it works!! but i get a few exceptions raised as soon as i call response.redirect to location on the disk.
The errors says "thread was being aborted"
It would be great if someone could throw some light on this please!

Cheers

Gary

 

by: matchbx27Posted on 2004-03-31 at 04:10:21ID: 10722951

I'm using code provided to me by Crystal Decisions (now Business Objects).  The code that they gave me did not work and after some troubleshooting with Business Objects it was discovered that the response.end (the last line of code)  was missing.


This function should be the very last function called, instead of assigning your ReportClientDocument Object to the Viewer.

   crViewer.ReportSource = rptClientDoc
   crViewer.Visible = True


Call this Code


    Private Sub OpenInPDF()

        Dim crRptExportFormat As Integer

        '5 is the emun for pdf
        crRptExportFormat = 5

        Dim oPrintOutputController As PrintOutputController

        'rptClientDoc is the ReportClientDocument Object
        oPrintOutputController = rptClientDoc.PrintOutputController

        Response.ClearContent()
        Response.ClearHeaders()
        Dim oByte(1) As Byte

        oByte = oPrintOutputController.Export(crRptExportFormat).ByteArray

        'Response.ContentType = "application/pdf"
        Response.AddHeader("Content-disposition", "filename=" & "untitled" & ".pdf")
        Response.BinaryWrite(oByte)
        Response.End()
    End Sub

 

by: fersanchezonoPosted on 2004-04-06 at 06:33:10ID: 10765698

If i export the report using PrintOutputController to pdf, a message "Damage file can't recover it" appears, using RAS 9 with c#.

Why this happens?

 

by: matchbx27Posted on 2004-04-06 at 06:51:35ID: 10765888

Am I to assume you are not using Cyrstal Enterprise but RAS instead?

If so, I have not used RAS.  I attempted to look for some sample code at http://www.businessobjects.com/products/dev_zone/net/downloads.asp?ref=devzone_netzone_nav

But I did see any samples referencing pdf files.

Sorry I could not help,
matchbx

 

by: fersanchezonoPosted on 2004-04-06 at 06:53:26ID: 10765905

Don't worry thanks anyway, yes, i'm using Report Application Server 9.

I

 

by: ladylinetPosted on 2004-04-06 at 11:57:55ID: 10768763

Download hotfix for ras.

Lady LInet

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...