cancel
Showing results for 
Search instead for 
Did you mean: 

Report too wide for viewer

Former Member
0 Kudos

I have a report that is 20 inches wide. When I open the viewer, the right side is cut off. Is there a way to change the page width in the viewer?

Thanks....Linda

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, Linda;

Can you provide a bit more information? What version of Crystal Reports are you working with? Is this a web or windows based application? What language are you developing your application in?

Regards,

Jonathan

Former Member
0 Kudos

Crystal 11.5.10.1263.

Calling the viewer from vb.net.

Former Member
0 Kudos

sample code that calls the viewer:

Public Overloads Sub ShowReport(ByVal path As String, _

ByVal parameters As ArrayList, _

Optional ByVal formCaption As String = "Report Viewer")

Dim splashScreen As Csg.Reporting.CrystalManager.frmSplash = New Csg.Reporting.CrystalManager.frmSplash

Try

splashScreen.Show()

System.Windows.Forms.Application.DoEvents()

Dim myReport As ReportDocument = New ReportDocument

myReport.Load(path, CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)

'create a new report database table object

Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table

'create a new logon info object

Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo

'Note: this code loops through each table in the report, but Customers.rpt

'was designed off of only one table, the Customers table. Therefore, this

'loop is not really needed, and one could reference

'rdCustomers.Database.Tables(0). The loop is provided for flexibility,

'if a report created off of more than one table was used.

'for each table in the tables collection of the report

For Each tbCurrent In myReport.Database.Tables

'get the logon info

tliCurrent = tbCurrent.LogOnInfo

'with the logon info's ConnectionInfo object

With tliCurrent.ConnectionInfo

'change the connection info to point to the Xtreme_small.mdb

'Access database located in the current application directory

'Note: for Access databases, the .ServerName property points

'to the .mdb file and the .DatabaseName property is blank.

'(UserID is "Admin" with a blank password for this database.)

'For SQL Server and other databases, the .ServerName property

'is the database server name and the .DatabaseName is the name

'of the database. .UserID and .Password are the userID and password

'needed to connect to the database.

.DatabaseName = DatabaseName

.UserID = ""

.Password = ""

.ServerName = ServerName

End With

'apply changes made to the TableLogonInfo object

tbCurrent.ApplyLogOnInfo(tliCurrent)

Next tbCurrent

If Not (parameters Is Nothing) Then

SetCurrentValuesForParameterField(myReport, parameters)

End If

Dim frm As New ReportDisplay

frm.CrystalReportViewer1.ReportSource = myReport

frm.CrystalReportViewer1.ShowRefreshButton = False

frm.Text = formCaption

frm.StartPosition = Windows.Forms.FormStartPosition.CenterScreen

frm.Show()

splashScreen.Close()

Catch ex As Exception

splashScreen.Close()

Throw New ApplicationException(ex.Message, ex.InnerException)

End Try

End Sub

Former Member
0 Kudos

The viewer shows this report as 8.5 x 11 even though I have it designed for 20" x 8.5 (custom size) and I do have the print driver installed. Any other ideas?

0 Kudos

Hi Linda,

Is the printer with the customer paper size your default printer? If not then you have a few options, check off Use Default printer in the report menu File, Page Setup and test again.

Or

It may be possible the problem is the permissions or user your app is running under, it may not be able to see the printer you installed. Microsoft has kbase articles that explain how to configure printers so all users including the local system account has access to them.

By default if CR cannot find a default printer or the default printer the report was used when designed we use Microsoft's Generic Print driver and reset the orientation to 8 1/2 x 11.

Thank you

Don

Former Member
0 Kudos

Don,

Thank you for addressing this issue.

I do not see an option for: check off Use Default printer in the report menu File, Page Setup. Can you tell me where it is?

Thanks, Linda

Former Member
0 Kudos

Don,

Do you have a link to a kbase article? I have been searching and can't find one.

Thanks,

Linda

Former Member
0 Kudos

Hi Linda,

To use Default printer click on :

File -> Page Setup->In Printer options click on Printer...

Select printer name from dropdown.

click on Ok.

Or try with this :

Click on File ->Print->Right click on Printer->Set as Default Printer.

Hope that helps!!

Regards,

Shweta

Former Member
0 Kudos

Hi Linda,

To search for the knowledge base click [here|https://www.sdn.sap.com/irj/sdn/businessobjects-notes]

Amit

Former Member
0 Kudos

Don,

I am making some progress! The viewer in my application recognized the paper sizes but it does not recognize the Custom Size. Does that make sense?

Thanks,

Linda

0 Kudos

Hi Linda,

That's odd, it may be the custom paper size enum is incorrect. I'm going to attach a test app that is based on micosoft's printer kabase article. Search for DEVCAP on MS's site if this doesn't work. Thi sis all MS API's, one of guys here simply wrote the app to verify the issues.

Run the app and select your printer, the custom paper size should be seen, if not there is an issue with the printer driver.

If you print this from the viewer using our print button and selecting the custom paper size does that work?

Thank you

Don

Former Member
0 Kudos

Don,

I could not download DEVCAP from the forum, but I got it from Microsoft's site. I ran it. I ran my report in the application and the custom size worked!

Questions:

What does that mean?

Do I need to uninstall DEVCAP somehow?

Thanks, Linda

Former Member
0 Kudos

Hi All,

Somehow we got the XPS Document Writer installed even though it says XPS Elements Pack does not work for XP SP3. Anyway, we used E size paper which is super wide and will fit all of our fields. It is working in the viewer also. I am closing the issue. Thanks to all who helped!

Linda

0 Kudos

HI Linda,

That is really odd, I've never heard of DEVCAP ever "fixing" a printer issue. Great you found the solution using MS's document writer..

Thanks agian

Don

Answers (0)