PC Review


Reply
Thread Tools Rate Thread

Crystal Report Viewer displays Blank Object

 
 
zdrakec
Guest
Posts: n/a
 
      21st Mar 2005
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

 
Reply With Quote
 
 
 
 
Bernie Yaeger
Guest
Posts: n/a
 
      21st Mar 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
zdrakec
Guest
Posts: n/a
 
      22nd Mar 2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Crystal Report to Network Print Mailbox While Bypassing Crystal Report Viewer. John Smith Microsoft VB .NET 0 17th Jan 2007 04:17 PM
Crystal displays blank report...pls help!!! Mounilk Microsoft C# .NET 1 19th Jan 2006 11:24 PM
Crystal Report 10 and crystal report viewer control Harshil Microsoft Dot NET Framework Forms 0 9th Jul 2004 04:50 PM
Change Crystal Report Zoom Level using percentages in Crystal Report Viewer (Dotnet) Alex Stevens Microsoft Dot NET Framework Forms 1 30th Jun 2004 12:34 PM
Change Crystal Report Zoom Level using percentages in Crystal Report Viewer (Dotnet) Alex Stevens Microsoft Dot NET 1 30th Jun 2004 12:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:40 AM.