Click here to Skip to main content
15,895,256 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Starting index Pin
Jon_Boy26-Aug-08 6:53
Jon_Boy26-Aug-08 6:53 
QuestionRe: Starting index Pin
Bassam Saoud26-Aug-08 11:55
Bassam Saoud26-Aug-08 11:55 
JokeRe: Starting index Pin
Shog926-Aug-08 11:56
sitebuilderShog926-Aug-08 11:56 
AnswerRe: Starting index Pin
Eytukan26-Aug-08 17:53
Eytukan26-Aug-08 17:53 
AnswerRe: Starting index Pin
Eytukan26-Aug-08 17:58
Eytukan26-Aug-08 17:58 
QuestionDataModule is not a member of 'System.Security.Principal.IPrincipal' Pin
kmathebula26-Aug-08 5:20
kmathebula26-Aug-08 5:20 
Questionfrom vb.net crystal report result directly export to pdf Pin
Member 320956826-Aug-08 4:38
Member 320956826-Aug-08 4:38 
AnswerRe: from vb.net crystal report result directly export to pdf Pin
D4ever26-Aug-08 8:55
D4ever26-Aug-08 8:55 
Imports CrystalDecisions.Web
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.CrystalReports.Engine.ReportDocument
Partial Class test
Inherits System.Web.UI.Page
Dim cn As OledbConnection
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Call ShowReport()
End Sub
Sub ShowReport()

''***************************************************************************************
''Don't change any line in the below code or the report will not work as expected
''***************************************************************************************
Dim ConnInfo As New ConnectionInfo
With ConnInfo
.DatabaseName = "test"
End With

Dim rpt As New ReportDocument
rpt.Load(Server.MapPath("Abc.rpt"))

Dim ParamFields As ParameterFields = Me.CrystalReportViewer.ParameterFieldInfo
Dim ParamField As New ParameterField
Dim ParamField_Value As New ParameterDiscreteValue

ParamField.Name = "frmdt"
ParamField_Value.Value = Session("FROMDATE") ''frmDate ''"30-Oct-2007 12:00:00"
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("frmdt").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)

ParamField = New ParameterField
ParamField_Value = New ParameterDiscreteValue
'Here todt is the parameter name Created in Report
ParamField.Name = "todt"
ParamField_Value.Value = Session("TODATE") ''ToDate ''"31-Oct-2007 12:00:00"
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("todt").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)



''*********** VERY IMPORTANT ''*****************
''Whenever using Parameter passing to CR :- Assigning the ParameterFields object to the ParameterFieldInfo of the CrystalReportViewer object programmatically will also suppress the default dialog asking for parameters that normally appears when you open a report with parameters.
Me.CrystalReportViewer.ParameterFieldInfo = ParamFields

For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer.LogOnInfo
cnInfo.ConnectionInfo = ConnInfo
Next
'========================================================================================================
'To Open Report In PDF
'========================================================================================================
'Dim ms As System.IO.MemoryStream
'ms = CType(rpt.ExportToStream(ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
'rpt.Close()
'Response.ClearContent()
'Response.ClearHeaders()
'Response.ContentType = "Application/pdf"
'Response.AppendHeader("Content-Dispositon", "attachment;filename=DatewiseReport.pdf")
'Response.Buffer = True
'Response.BinaryWrite(ms.ToArray())
'Response.End()
'========================================================================================================
''*********** VERY IMPORTANT ''*****************
'' Error message "Thread was being aborted" - Solution - If your are using Try...Catch block then remove it.
End Sub

End Class

Darshana Pathak

AnswerRe: from vb.net crystal report result directly export to pdf Pin
D4ever28-Aug-08 7:59
D4ever28-Aug-08 7:59 
QuestionHow to store data from DataGridView to SQL Sever 2005 [modified] Pin
Francis K Antony26-Aug-08 2:57
Francis K Antony26-Aug-08 2:57 
AnswerRe: How to store data from DataGridView to SQL Sever 2005 Pin
D4ever26-Aug-08 9:05
D4ever26-Aug-08 9:05 
QuestionRe: How to store data from DataGridView to SQL Sever 2005 Pin
Francis K Antony26-Aug-08 20:51
Francis K Antony26-Aug-08 20:51 
AnswerRe: How to store data from DataGridView to SQL Sever 2005 Pin
D4ever27-Aug-08 9:21
D4ever27-Aug-08 9:21 
QuestionRe: How to store data from DataGridView to SQL Sever 2005 Pin
Francis K Antony27-Aug-08 20:25
Francis K Antony27-Aug-08 20:25 
AnswerRe: How to store data from DataGridView to SQL Sever 2005 Pin
D4ever28-Aug-08 7:57
D4ever28-Aug-08 7:57 
Questionruntime error 53 - "file not found" Pin
Vikas K.26-Aug-08 2:38
Vikas K.26-Aug-08 2:38 
AnswerRe: runtime error 53 - "file not found" Pin
Manas Bhardwaj26-Aug-08 3:00
professionalManas Bhardwaj26-Aug-08 3:00 
AnswerRe: runtime error 53 - "file not found" Pin
jzonthemtn26-Aug-08 5:47
jzonthemtn26-Aug-08 5:47 
AnswerRe: runtime error 53 - "file not found" Pin
Vikas K.28-Aug-08 0:44
Vikas K.28-Aug-08 0:44 
Questiongetting System.Type object Pin
indian14326-Aug-08 0:34
indian14326-Aug-08 0:34 
AnswerRe: getting System.Type object Pin
Manas Bhardwaj26-Aug-08 0:58
professionalManas Bhardwaj26-Aug-08 0:58 
AnswerRe: getting System.Type object Pin
N a v a n e e t h26-Aug-08 1:15
N a v a n e e t h26-Aug-08 1:15 
GeneralRe: getting System.Type object Pin
indian14326-Aug-08 1:38
indian14326-Aug-08 1:38 
GeneralRe: getting System.Type object Pin
indian14326-Aug-08 5:41
indian14326-Aug-08 5:41 
AnswerRe: getting System.Type object Pin
Guffa26-Aug-08 4:06
Guffa26-Aug-08 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.