Hi everyone,
I am trying to use crystal report in asp.net. reports first page is displayed
successfully but when I go to the next page report is not displayed but instead
a report viewer control is displayed. If I try to refresh the report then also
the report viewer control is displayed. Only the first page works fine. I was
wondering if there is any paging control in crystalreportviewer.
This is the code that I am using
Dim oConnection As New SqlClient.SqlConnection("server=(local); database =
test; Trusted_connection=yes ")
oConnection.Open()
Dim contentType As String
Dim oCommand As New _
SqlClient.SqlCommand("select * from tmpRptCheckRegister", oConnection)
Dim ds As New DataSet()
Dim oDataAdapter As New SqlClient.SqlDataAdapter(oCommand)
oDataAdapter.Fill(ds, "oClaims")
Dim rpt As New CrystalReport1()
rpt.SetDataSource(ds.Tables("oClaims"))
CrystalReportViewer1.ReportSource = rpt
This code works fine because data is coming in the dataset and first page is
displayed sucessfully. I tried to keep this code inside the isnotpostback
statment and also outside the if isnotpostback statemnet. It shows the
crystalreportviewer if it is inside the If isnotpostback statement and it keeps
on showing page 1 after refresh or when I try to go to next page when I keep
this code outside the if notpostback statement.
Any help will be greatly appreciated.
Thanks
---------------------------------
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/