Showing posts with label print. Show all posts
Showing posts with label print. Show all posts

Monday, March 19, 2012

crashing excel when printing exported RS report

We are having a problem with some reports that get exported to excel and then
trying to print. we don't get this with all reports just some.
Here is what happens:
The report generates fine in RS. We then export to excel. We tell excel to
print and then get a 'Memory can't be read' error and excel crashes.
Whenever we want to just print a report as is, we export to PDF and print
that way. But many times the report is used in excel for further analisys
with other data. I have tried printing without touching the report in excel
and still get the error. So I know it is not something we added.
Because we are only getting this error with some reports and not all, I am
guessing that there must be something that was(n't) added to the report in RS
that would cause this.
Did I make enough sense to explain my issue?We are having the same problem with a couple of reports that were recently
modified. The modifications included adding a couple of additonal parameters
and then displaying the parameter values in the report footer. We already had
the report parameters displaying in the footer with no problems.
Our users are running Office 97 on WIndows NT worksatations. Our
deveoplment environment is running Windows XP with Office 2003 and the report
printing problem cannot be reproduced in the development environment.
Anyone had any luck with fixing this problem?
Ray
"David" wrote:
> We are having a problem with some reports that get exported to excel and then
> trying to print. we don't get this with all reports just some.
> Here is what happens:
> The report generates fine in RS. We then export to excel. We tell excel to
> print and then get a 'Memory can't be read' error and excel crashes.
> Whenever we want to just print a report as is, we export to PDF and print
> that way. But many times the report is used in excel for further analisys
> with other data. I have tried printing without touching the report in excel
> and still get the error. So I know it is not something we added.
> Because we are only getting this error with some reports and not all, I am
> guessing that there must be something that was(n't) added to the report in RS
> that would cause this.
> Did I make enough sense to explain my issue?
>
>|||We have finally solved this issue.
Our poblem was solved by reducing the amount of information in the report
footer. We display the users input parameter values in the footer to allow
them to print the parameters used when rendering the report. In our case we
had increased the number of parameters in the report and hence displayed in
the footer from 6 to 8. This caused Excel to crash when attempting to print
the export file. We have since reduced the parameters in the footer to 6
again and now the report prints in Excel.
Hope this may help you in finding the soucre of you printing problems.
"David" wrote:
> We are having a problem with some reports that get exported to excel and then
> trying to print. we don't get this with all reports just some.
> Here is what happens:
> The report generates fine in RS. We then export to excel. We tell excel to
> print and then get a 'Memory can't be read' error and excel crashes.
> Whenever we want to just print a report as is, we export to PDF and print
> that way. But many times the report is used in excel for further analisys
> with other data. I have tried printing without touching the report in excel
> and still get the error. So I know it is not something we added.
> Because we are only getting this error with some reports and not all, I am
> guessing that there must be something that was(n't) added to the report in RS
> that would cause this.
> Did I make enough sense to explain my issue?
>
>

Sunday, March 11, 2012

CR10 ActiveX print orientation

Does anyone know how to set the page orientation of the print dialog on the users machine at runtime? Is it possible?
i.e. if you create a CR with landscape layout and the users default print setup is portrait the report will not print correctly.You need to define something called :

crep.PaperOrientation = 2 ; //crDefaultPaperOrientation

Where

crDefaultPaperOrientation= 0
crLandscape= 2
crPortrait = 1

Goto Crystal reports'd developer help and search for PaperOrientation or CRPaperOrientation :

Printer Settings
This application (some demo application) demonstrates how to change the report printer settings at runtime using code.

There are four new report properties that allow you to easily retrieve and set PaperSize, PaperOrientation, PaperSource, and PrinterDuplex for the report printer options. All of these are demonstrated.
There is also a new method called PrinterSetup that provides a Windows standard printer setup window to allow the user to change the printer properties directly at runtime. This is demonstrated as well.
The two methods are independent of each other. For example, changing the Windows standard printer setup will not alter the report printer settings and vice-versa. These new properties and the new method give you much more control over how the report is printed.


Thanks

:wave:

CR prints no record although there is records in dbase

Dear all,

I found a problem and this makes me frustrated.
I'm using VB6 and CR 8, When I saved a transaction and print invoice, there is no data printed on CR (I'm sure the there is a record saved in database). The big matter is it's happened sometimes.
It runs ok for several transaction and happen again.
I'm really confused, I've tried to close all connection before printing invoice. But it still happened.
Please let me know what should I do.
Urgent..

Thank you.One thing that gave good result to me, was :
In VB6, before process the report:
Close the tables and database & execute DoEvents
ReOpen the database and tables (if needed) after preview or print the report

CR / VB Sort Problem

OS= Windows XP SP2 Professional, Crystal Report XI Developers Edition, Visual Basic 6 Enterprise

Below is the code I am trying to use to print a report. This code except for this "ElseIf" statement is used and works fine to print other reports. The only difference between printing this report and the other reports is 1) the name of the report and 2) this is the only report I have a sortfield.
.
.
.
ElseIf ReportName = "Alternate.rpt" Then
Set craxreport = craxapp.OpenReport(ReportPath & "\" & ReportName)
Set dbTable = craxreport.Database.Tables(1)
craxreport.RecordSortFields(0) = "+{AlternatePart.dbEnterDate}"
End If
craxreport.DiscardSavedData
' ****************************************************************************************
CrystalActiveXReportViewer1.Refresh
Call CrystalActiveXReportViewer1_RefreshButtonClicked(True)
CrystalActiveXReportViewer1.ReportSource = craxreport
CrystalActiveXReportViewer1.ViewReport
Set craxreport = Nothing
When I run this code, if I keep "craxreport.RecordSortFields(0) " I get a "Subscript out of Range" error.

The report is defined as follows:
- It uses a table called "AlternatePart"
- There are 3 fields in the table - (dbOldPn, dbNewPn, and dbEnterDate)
- All fields are described at TEXT
- The report shows all 3 fields.
- I used the Record Sort Expert to set up one sort field and that is "AlternatePart.dbEnterDate"

Can you tell me what is possibly causing the above error?

ThanksI have a little experience with crax.
I think maybe Indexes are not zero based. try index 1|||Yes try using craxreport.RecordSortFields(1) and see if it is working|||Yes try using craxreport.RecordSortFields(1) and see if it is working
That was the problem -- thank you.

Sam