Crystal report is not showing any data

15 pts.
Tags:
ASP.NET
Crystal Report
visual basic 2010
Hi, I had generated the crystal report by using visual stdio 2010, having asp.net vb and ms access database. It is working fine on local server but displaying blank page on server. I am including the code for reference. Thanks a lot to for solution in advance.
reportview.aspx.vb file

Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System.Data
Imports CrystalDecisions.Web
Imports CrystalDecisions.ReportSource
Partial Class PrintReportPraveshika
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:UsersCompaqDesktophindi vidyapith sitesite1App_DataEXAM.mdb"
        'MsgBox("HI")
        Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:/INETPUB/VHOSTS//hindividyapith.com/httpdocs/App_Data/Exam.mdb"

        Dim Connection As New OleDbConnection(strConnection)
        Dim s, top1, top2 As String
        s = Request.QueryString("var1")
        top1 = Request.QueryString("var1")
        top1 = top1.Substring(0, top1.IndexOf("var2"))

        top2 = s.Substring(s.LastIndexOf("=") + 1)

        'Dim strSQL As String = "SELECT `Preveshika`.`name`, `Preveshika`.`father_Name`, `Preveshika`.`Roll`, `Preveshika`.`Center`, `Preveshika`.`SubTotal`, `Preveshika`.`Result1` FROM   `Preveshika` `Preveshika` where center = '" & top1 & "' and roll = " & top2

        Dim strSQL As String = " SELECT `Preveshika`.`name`, `Preveshika`.`father_Name`, `Preveshika`.`Roll`, `Preveshika`.`Center`, `Preveshika`.`SubTotal`, `Preveshika`.`Result` FROM   `Preveshika` `Preveshika` " ' where center = '" & top1 & "' and roll = " & top2
        'MsgBox(strSQL)

        Dim DA As New OleDbDataAdapter(strSQL, Connection)
        Dim DS As New DataSet


        '
        ' Create a datatable in your dataset. The datatable's name 
        ' must match that in the schema file used by the report.
        '
        DA.Fill(DS, "Preveshika")
        'MsgBox(DS.Tables(0).Rows.Count)
        'Dim strReportPath As String = "C:UsersCompaqDesktophindi vidyapith sitesite1MyReportCrystalReportPraveshika.rpt" ' Application.StartupPath & _

        'Dim strReportPath As String = "D:/INETPUB/VHOSTS//hindividyapith.com/httpdocs/MyReport/CrystalReportPraveshika.rpt" ' Application.StartupPath & _
        Dim strReportPath As String = "D:/INETPUB/VHOSTS//hindividyapith.com/httpdocs/MyReport/CrystalReportPraveshika.rpt" ' Application.StartupPath & _


        If Not IO.File.Exists(strReportPath) Then
            Throw (New Exception("Unable to locate report file:" & _
              vbCrLf & strReportPath))
        End If

        Dim cr As New ReportDocument
        cr.Load(strReportPath)
        cr.Load(Server.MapPath("CrystalReportPraveshika.rpt"))
        cr.SetDataSource(DS.Tables("Preveshika"))
        cr.Refresh()

        Me.CrystalReportViewer1.ReportSource = cr
         
    End Sub
End Class


web config file

<?xml version="1.0"?><configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          </sectionGroup>
          </sectionGroup></sectionGroup></configSections>
                                                                                                                                                                                                                                                                                                                       <appSettings>
                                                                                                                                                                                                                                                                                                                           <add key="CrystalImageCleaner-AutoStart" value="true"/>
                                                                                                                                                                                                                                                                                                                           <add key="CrystalImageCleaner-Sleep" value="60000"/>
                                                                                                                                                                                                                                                                                                                           <add key="CrystalImageCleaner-Age" value="120000"/>
                                                                                                                                                                                                                                                                                                                       </appSettings>
                                                                                                                                                                                                                                                                                                                       <system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</assemblies><buildProviders><add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></buildProviders></compilation>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/></compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/></handlers></system.webServer>
</configuration>


Software/Hardware used:
asp.net vb

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Have you tried just querying the database from the app (without involving a report) to see if the application is connecting to the database as expected?
    69,065 pointsBadges:
    report
  • 2007sanjay
    Thanks for your interest to solve my problem. Yes, I had written the normal query to display data on web page for search purpose. It is working correctly without any error.
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following