I have problem when display report from Crystal Report using Store Procedure SQL Server. When I run the project the page always blank. What should I do? Please help me.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="viewerKwitansi.aspx.vb" Inherits="POS_Maya.viewerKwitansi" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="dvReport">
<CR:CrystalReportViewer ID="crtViewer" runat="server" AutoDataBind="True"
Height="400px" Width="600px" BestFitPage="False"
GroupTreeImagesFolderUrl="" ReportSourceID="CrystalReportSource1"
ToolbarImagesFolderUrl="" ToolPanelView="None" ToolPanelWidth="200px" />
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="backend\reports\kwitansi.rpt">
</Report>
</CR:CrystalReportSource>
</div>
</form>
</body>
</html>
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Imports System.IO
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports System.Net
Public Class viewerKwitansi
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Dim crystalReport As New ReportDocument()
crystalReport.Load(Server.MapPath("~/reports/kwitansi.rpt"))
crystalReport.SetDatabaseLogon("myUser", "test", "localhost", "dbPOS")
crystalReport.SetParameterValue("@f_kode_billing", Request.QueryString("kode_billing"))
crtViewer.ReportSource = crystalReport
End If
End Sub
End Class
In web config I also add this :
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
<section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</sectionGroup>
<appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true"/>
<add key="CrystalImageCleaner-Sleep" value="60000"/>
<add key="CrystalImageCleaner-Age" value="120000"/>
</appSettings>