473,383 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Crystal Report Viewer displays Blank Object

Hello all:

I have the Crystal Report viewer imbedded on a .NET form, and it works
very well... except, on the target machine, when I set the ReportSource
property of the viewer (to a ReportDocument object), it PRETENDS to
load a report, but displays a blank object. The toolbar becomes active,
the navigation buttons are active, but otherwise the viewer does not
have the report loaded. Clicking the "Refresh" button of the viewer at
this point actually results in the report toolbar being disabled.

Mind you, the component is correctly registered via the merge modules,
and the database authentication is handled in the code. In fact, the
app works perfectly IF the target machine happens to have VS.NET
installed.
But for other machines, the report viewer throws no exception, just
displays a blank... doesn't even prompt for parameters.

Suggestions?

Cheers,
zdrakec

Nov 21 '05 #1
2 8138
Hi,

It may be your authorization. Try something like this before calling the
reportsource:
Dim crtablelogoninfos As New TableLogOnInfos

Dim crtablelogoninfo As New TableLogOnInfo

Dim crconnectioninfo As New ConnectionInfo

Dim crtables As Tables

Dim crtable As Table

Dim tablecounter As Integer

crreportdocument.Load(gl_browseprintvar,
OpenReportMethod.OpenReportByTempCopy)

With crconnectioninfo

..DatabaseName = "IMC"

..ServerName = globalservername

..UserID = globalusername

..Password = globalpwd

End With

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtables = crreportdocument.Database.Tables

For Each crtable In crtables

If (Mid(crtable.Name, 1, 4) = "magt" Or Mid(crtable.Name, 1, 23) =
"sp_createmagtbaseselect" Or Mid(crtable.Name, 1, 4) = "magb" Or
Mid(crtable.Name, 1, 4) = "magf") And gl_browseprintvar =
"f:\imcapps\hvsum.rpt" Then

crconnectioninfo.DatabaseName = "imc_extra"

crtablelogoninfo.ConnectionInfo = crconnectioninfo

Else

crconnectioninfo.DatabaseName = "IMC"

crtablelogoninfo.ConnectionInfo = crconnectioninfo

End If

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = crtable.Name

Next

Dim subRepDoc As New ReportDocument

Dim crSection As Section

Dim crReportObject As ReportObject

Dim crSubreportObject As SubreportObject

'If you have any sub-reports, they need the connection info too...

For Each crSection In crreportdocument.ReportDefinition.Sections

For Each crReportObject In crSection.ReportObjects

If crReportObject.Kind = ReportObjectKind.SubreportObject Then

crSubreportObject = CType(crReportObject, SubreportObject)

subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject. SubreportName)

For Each crtable In subRepDoc.Database.Tables

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = crtable.Name

Next

End If

Next

Next

CrystalReportViewer1.ReportSource = crreportdocument

HTH,

Bernie Yaeger

"zdrakec" <zd*****@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello all:

I have the Crystal Report viewer imbedded on a .NET form, and it works
very well... except, on the target machine, when I set the ReportSource
property of the viewer (to a ReportDocument object), it PRETENDS to
load a report, but displays a blank object. The toolbar becomes active,
the navigation buttons are active, but otherwise the viewer does not
have the report loaded. Clicking the "Refresh" button of the viewer at
this point actually results in the report toolbar being disabled.

Mind you, the component is correctly registered via the merge modules,
and the database authentication is handled in the code. In fact, the
app works perfectly IF the target machine happens to have VS.NET
installed.
But for other machines, the report viewer throws no exception, just
displays a blank... doesn't even prompt for parameters.

Suggestions?

Cheers,
zdrakec

Nov 21 '05 #2
Hello Bernie:

Well, of course I am already doing that, or I should be prompted to log
in whenever the report runs. And the report, as I mentioned, runs fine
on machines with VS.NET already installed....
What is happening instead is a blank gray area where I would expect to
see my report. It ACTS like it loaded the report: the report viewer
client area turns a darker grey, the "Main Report" table becomes
visible and enabled, the report viewer's toolbar becomes enabled...

Other ideas, anyone?

By the way, Seagate (or Business Objects, or whatever), needs to work
on their technical support. Better yet, they need to work on this
product. It has already been a complete pain in the ass to implement,
from the database authentication code you give above, to the
poorly-documented packaging of numerous merge modules with the
installation package, and now this...

Cheers,
zdrakec

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ashish Shridharan | last post by:
Hi All, I'm not very sure if this is the forum for my question but i was hoping someone could direct me to the right place (or answer my question). I am using the .NET crystal report viewer...
7
by: mrwoopey | last post by:
I have a asp.net application that uses the crystal report viewer control. It displays all of my reports but all of a sudden it started giving me the following error on ONLY two reports: "Fail...
0
by: louise raisbeck | last post by:
Hi, The first part of this code def works as i have an export function which saves my crystal report, as a pdf, to disk. However they want to be able to view them before deciding to save them. I...
1
by: Harshil | last post by:
Hi All, I am working on Vb.net application with oracle as my database. I have developed reports using crystal report 9. Usually when you open reports directly in crystal report viewer control it...
0
by: mano.bharath | last post by:
I am developing a windows application in VB.NET 2005 that includes a number of crystal reports. To use the reports I use the included crystal report viewer and pass a dataset to the report at...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
0
by: SwamyKarthik | last post by:
I am trying to build an app that reads crystal reports. I was able to load the Crystal report viewer as a ActiveX plugin however I'm having problems. Here's my code: Public Class Form1 ...
1
by: CAM | last post by:
Hello, I am using Vista Basic.Net 2008 and I wondering what is the best way to display crystal reports in a form. I have about 10 different crystal reports what I am currently doing is using a...
0
by: mohanty2050 | last post by:
I am using Crystal Report 9 and VB6.0. I can display the report through Crystal report viewer properly. But the print button in the Crystal report viewer does not work. My printer is in network. If I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.