Results 1 to 12 of 12

Thread: 2005 Exp - Crystal Report Source

  1. #1

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    2005 Exp - Crystal Report Source

    Hi Guys,

    I have created a CR Report that I use in an app (frontend to an Access DB).

    As is well except the data that I used to create the CR Report is showing up in the VB.Net app although I have:
    1. saved the Report without data (option within CR)
    2. in my app, I specify the data source (see below)

    Code:
            Report.Load(Application.StartupPath & "\Dependancies\Blank.rpt")
            Report.SetDataSource(Me.LogbookDataSet.tbl_Logbook)
            CrystalReportViewer.ReportSource = Report
            Me.PanelReport.Controls.Add(CrystalReportViewer)
    ??

  2. #2

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: 2005 Exp - Crystal Report Source

    Anyone?

  3. #3
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Re: 2005 Exp - Crystal Report Source

    does it throw any exceptions? do you have any subreports in the report? if you do the datasource needs to be set in the subreports as well.

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

  4. #4

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: 2005 Exp - Crystal Report Source

    HI vbdotnetboy,

    No exceptions - works as stated, but with the development data showing.


    The following seems related; in that the development DB cannot be changed (although I have implicity set the Data Source...):

    http://forums.microsoft.com/MSDN/Sho...72482&SiteID=1

  5. #5
    Frenzied Member vbdotnetboy's Avatar
    Join Date
    Jun 2004
    Location
    Lewisburg, PA "Next year Raiders in the Super Bowl"
    Posts
    1,310

    Re: 2005 Exp - Crystal Report Source

    does your access DB require login credentials?

    Derek - Using VS 2008 99% of the time and VS 2003 1% of the time

    Please Help Us To Save Ana

    ● Helpful Links: DNR TV | Awesome site for tips | Using ADO.NET to work with Excel | Xml Namespace 2.0 Framework Changes|Ultra High Security Password Generator | Mendhak's ADO.NET Tutorial
    ● Code Bank: Random Password Generator | Generic DbProviderFactory Access
    ● Site Work: Bottle Run Xtreme | Spaids Racing.com

    Company I work for - CSSI

    WHEN POSTING PLEASE INDICATE VERSION

    Please use vbcode tags or code tags when posting code
    [highlight=vb]ALL your code goes here[/highlight] or [code]ALL your code goes here[/code]

    If my post helped you in anyway... please be kind and give me some ratings

  6. #6
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: 2005 Exp - Crystal Report Source

    Yup - that's why Crystal Reports has so much developer community love :-)

    Maybe try:
    Code:
                    Me.CrystalReportViewer1.LogOnInfo.Clear()
                    If Me.CrystalReportViewer1.LogOnInfo.Count = 0 Then
                        Me.CrystalReportViewer1.LogOnInfo.Add(New CrystalDecisions.Shared.TableLogOnInfo())
                    End If
                    Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.ServerName = _ServerName
                    Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName = _DatabaseName
                    Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID = _UserId
                    Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.Password = _Password
    ?

  7. #7

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: 2005 Exp - Crystal Report Source

    Quote Originally Posted by vbdotnetboy
    does your access DB require login credentials?

    No, but suspect that may be an issue - why who the h*** knows - seems to be a problem tho.

    Hi Merrion,
    I was onto that (from the link I posted) but couldn't get the syntax right for the ServerName (have had a few cold ones....) will give it a shot

  8. #8

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: 2005 Exp - Crystal Report Source

    Bugger, it didn't work... looked promising tho.

    I do (and always did get) a dialog to select the DB path - as it's trying to use the development DB.





  9. #9
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: 2005 Exp - Crystal Report Source

    It may be that the report template wasn't saved with the data source logged off?

    Try logging off and then moving a label around to make CR think the report has changed then save it.

  10. #10

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: 2005 Exp - Crystal Report Source

    I will try that - thanks.

    (My dev .mdb was connected using OLE DB (ADO))

  11. #11

    Thread Starter
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: 2005 Exp - Crystal Report Source

    I have now tried a few other 'Logon' methods to no avail (following Merrions approach).

    Does any one else have a successful snippet used to 'Logon' / (re) connect to an mdb; similar to post #7?


  12. #12
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    Re: 2005 Exp - Crystal Report Source

    Hi Bruce,

    Try calling the CR Viewer's Refresh Method and see whether that makes any difference:

    Code:
    Report.Load(Application.StartupPath & "\Dependancies\Blank.rpt")
    Report.SetDataSource(Me.LogbookDataSet.tbl_Logbook)
    CrystalReportViewer.ReportSource = Report
    Me.PanelReport.Controls.Add(CrystalReportViewer)
    CrystalReportViewer.Refresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width