Print Page | Close Window

Parameter Prob.

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7463
Printed Date: 05 May 2024 at 12:33am


Topic: Parameter Prob.
Posted By: kuldevbhasin
Subject: Parameter Prob.
Date Posted: 24 Aug 2009 at 6:23am
hi i am new to asp.net. i am using vb.net 2008 pro. and sql server 2005
i am having a prob. with the report part which i have created in crystal reports.
the report is displaying perfect. but the report gets blank as soon as i click the print button in the toolbar.
and it again asks for the parameters and then the database logon screen
 
i have created the report using a dataset.
following is the code i have used:

GetData()

Dim rpt As New ReportDocument

CrystalReportViewer1.Visible = True

rpt.Load(Server.MapPath("Reports\rptSLBStatement.rpt"))

rpt.SetDataSource(newDs)

rpt.SetParameterValue("BookNo", txtBookNo.Text)

rpt.SetParameterValue("ReadDate", Format(dtPkReadDate.SelectedDate.Date, "dd/MM/yyyy"))

CrystalReportViewer1.DisplayGroupTree = False

CrystalReportViewer1.HasCrystalLogo = False

CrystalReportViewer1.ReportSource = rpt

CrystalReportViewer1.DataBind()

i am filling the data before this code. in GetData

this rpt. is generating fine but its giving the prob. only when i press the print button or the export button.

hope u help me at the earliest.

thankx in advance. 




Print Page | Close Window