ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
how to connect crystal report with vb.net ?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to connect crystal report with vb.net ?
Answer
# 1
Click on Project menu
-->then Click Add New Item
-->Choose Crystal Report
-->Give the name of the report that you want to give
-->Click on Add Report
 
Is This Answer Correct ?    9 Yes 3 No
Sonia
 
  Re: how to connect crystal report with vb.net ?
Answer
# 2
Follow These Steps:
Click on Project menu
-->then Click Add New Item
-->Choose Crystal Report
-->Give the name of the report that you want to give
-->Click on Add Report
and also
-->Click Add New Dataset(.XSD File)
-->Right Click on That File Add Table Adapter
-->Make Connection and Write The Query and Follow The Step 
as Come In Wizard
-->The In Blank Report Go Field Explore
-->DataBase Fields and Chose ADO.NET Dataset it The Table 
you have Create in Dataset 
-->Now Drag and Drop it in You Reports
 
Is This Answer Correct ?    3 Yes 2 No
Dinesh Sharma
 
 
 
  Re: how to connect crystal report with vb.net ?
Answer
# 3
Public Sub ReportView(ByVal RepoPath As String, Optional 
ByVal param As String = "")
        Dim ConInfo As New 
CrystalDecisions.Shared.TableLogOnInfo
        Dim objReport As New 
CrystalDecisions.CrystalReports.Engine.ReportDocument
        Dim strParamenters As String = param
        Dim strParValPair() As String
        Dim index As Integer
        Dim strVal() As String
        Dim Para As String
        Dim Val As String

        objReport.Load(RepoPath)
        If Trim(param) <> "" Then
            strParValPair = strParamenters.Split("&")
            For index = 0 To UBound(strParValPair)
                If InStr(strParValPair(index), "=") > 0 Then
                    strVal = strParValPair(index).Split("=")
                    Para = strVal(0)
                    Val = strVal(1)
                    objReport.SetParameterValue(Para, Val)
                End If
            Next
        End If
        LoginCR(objReport)

        For Each Table As 
CrystalDecisions.CrystalReports.Engine.Table In 
objReport.Database.Tables
            ConInfo = Table.LogOnInfo
            ConInfo.ConnectionInfo.UserID = "UserName"
            ConInfo.ConnectionInfo.Password = "Password"
            ConInfo.ConnectionInfo.ServerName = "Your 
Server Name"
            ConInfo.ConnectionInfo.DatabaseName 
= "Attendance"
            Table.ApplyLogOnInfo(ConInfo)
        Next
        
FrmCrystalRptViewer.CrystalReportViewer1.DisplayGroupTree = 
False
        
FrmCrystalRptViewer.CrystalReportViewer1.ReportSource = 
Nothing
        
FrmCrystalRptViewer.CrystalReportViewer1.ReportSource = 
objReport
        FrmCrystalRptViewer.Show()
        
FrmCrystalRptViewer.CrystalReportViewer1.DisplayGroupTree = 
False
        FrmCrystalRptViewer.CrystalReportViewer1.Show()
    End Sub
    Private Sub LoginCR(ByRef CRep As 
CrystalDecisions.CrystalReports.Engine.ReportDocument)
        Dim LogonInfo As 
CrystalDecisions.Shared.TableLogOnInfo
        For Each Table As 
CrystalDecisions.CrystalReports.Engine.Table In 
CRep.Database.Tables
            ConInfo = Table.LogOnInfo
            ConInfo.ConnectionInfo.UserID = "UserName"
            ConInfo.ConnectionInfo.Password = "Password"
            ConInfo.ConnectionInfo.ServerName = "Your 
Server Name"
            ConInfo.ConnectionInfo.DatabaseName 
= "Attendance"
            Table.ApplyLogOnInfo(LogonInfo)
        Next
    End Sub
 
Is This Answer Correct ?    2 Yes 1 No
Himanshu
 
  Re: how to connect crystal report with vb.net ?
Answer
# 4
Take crystal report from toolbox .Take New form (I named it 
frmRpt)Then take crystal report Viewer from tool box and 
place it on new form(frmRpt) I named crystal report Viewer 
as crptVW 
double click on newform(frmRpt) and place this code---

Public Class frmRpt
    Public strRptName As Object
    Public strRptFilter As String
    Private Sub frmRpt_Load(ByVal sender As System.Object, 
ByVal e As System.EventArgs) Handles MyBase.Load
        If strRptFilter <> "" Then
            crptVW.SelectionFormula = strRptFilter
        End If
        crptVW.ReportSource = strRptName
        crptVW.Show()
    End Sub
End Class


now if u want to call it on button_click then paste this 
code on that button_click event ------

Dim objRpt As New frmRpt
        objRpt.strRptName = New crList
        ' objRpt.strRptFilter = "{ConsultantMaster.ConId}=" 
& cboConIDX.SelectedValue 'if want to filter
        objRpt.Show()

'now u can open as many crystal report just paste code 
above on button_click()
 
Is This Answer Correct ?    1 Yes 1 No
Kafeel Ahmad
 
  Re: how to connect crystal report with vb.net ?
Answer
# 5
1)how to connect crystal report with vb.net ?
2)how to pass the parameter?
 
Is This Answer Correct ?    2 Yes 0 No
Vinod Kondhalkar
 
  Re: how to connect crystal report with vb.net ?
Answer
# 6
by connection strings
 
Is This Answer Correct ?    1 Yes 1 No
Guest
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
sql satement for 2nd maximum value NIIT10
Difference between VB dll and assemblies in .NET ? Digital-GlobalSoft5
How to Insert a TextBox value in to Sql database using VB.Net coding?  3
what is vb.net?  9
Disadvantages of vb ? Digital-GlobalSoft4
What is the difference between Dataset and Recordset?  7
I want to reduce my CPU Usage when I am querying the Database for records. Now my Winform App(in VB.Net) suddenly Jumps to 100% CPU Usage when i query for records from sql server database. I want this Usage to be less. Any help is appreciated  2
how to connect crystal report with vb.net ? Patni2
What is VB.Net? Ksb3
What is shadowing? TCS3
concept of object oriented programming Patni5
Hi I am planning to take interview in VB.net,can any one share your interview Questions for a Entry-level job. Regards Lina  3
what is the base class of .net?  6
Is there any easy way to convert VB6 programs to VB.Net?  3
What is the DIfference between Friend and Protected Friend? CTS5
what are the difference between An input box and Message box ..?  3
Advantage of vb.net over vb ? Digital-GlobalSoft5
what r the properties should be given to set method? PSI-Data-Systems2
what is the root namespace for all types?  5
hello friends, I have created a animated button in VB.NET. As its dll file coding can be viewed and also copied to some other location. So my question is how can I protect the Dll file of the animated button so that noone can access it. Any idea about this???????? Thanks Rekha  1
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com