on 04-28-2015 1:26 PM
Hi.
I have tried using CR with DataSet and Connectivity and display fine from my code.
But when I pressed to the next page. this prompt appear(In every project to use CR with DataSet)
What are the causes? and How to fix this issue?
CR SP 13.0.13.1597 , VS2013 With Update 4 and .NetFramework4.5.1
If you need more information ask me anytime.
Thank for response. -/\-
Typically, the cause is that the report engine does not understand the dataset being passed top it. E.g.; the something in the dataset format is different than what the report was designed with. For troubleshooting steps see the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports - Business Intelligence (BusinessOb...
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look at my code
some one help me to put load code in the Page_Init section and use Postback to keep the report in session.
If me bind my report's datasource in the button_click .
because i need the user to select a date range from the Textbox. Then click show report ,how can do it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Put your report load code in the Page_Init section and use Postback to keep the report in session.
It's prompting because it's loading the report on each page event because it's lost the session.
Don
PS - PLEASE search, this issue has been posted multiple times.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. Don Thank for response
I found similar questions with my case.
Add Session code to keep the report in session and a postback method to tell the report it is in an active session.
And See this KBA: From Ludek
SAML Response from SAP Cloud Identity
I have tried with my Code.
I don't know how to deploy with my code.
i'm using the following code.
aspx
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" style="margin-bottom: 0px" Text="Button" />
<br />
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
</div>
</form>
</body>
aspx.vb
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim objConn As New SqlConnection
Dim objCmd As New SqlCommand
Dim dtAdapter As New SqlDataAdapter
Dim ds As New DataSet
Dim dt As DataTable
Dim strConnString, strSQL As String
strConnString = "Server= BAS-PC\BAS ;UID=sa;PASSWORD=mypass;database=mydb;Max Pool Size=400;Connect Timeout=600;"
strSQL = "SELECT * FROM vwReport WHERE Date BETWEEN '" & Me.TextBox1.Text & "' AND '" & Me.TextBox2.Text & "' "
objConn.ConnectionString = strConnString
With objCmd
.Connection = objConn
.CommandText = strSQL
.CommandType = CommandType.Text
End With
dtAdapter.SelectCommand = objCmd
dtAdapter.Fill(ds, "myDataTable")
dt = ds.Tables(0)
dtAdapter = Nothing
objConn.Close()
objConn = Nothing
Dim rpt As New ReportDocument()
rpt.Load(Server.MapPath("CrystalReport1.rpt"))
rpt.SetDataSource(dt)
Me.CrystalReportViewer1.ReportSource = rpt
Me.CrystalReportViewer1.RefreshReport()
End Sub
End Class
help me please i don't know how to deploy with my code.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.