Results 1 to 14 of 14

Thread: crystal report blank

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164

    crystal report blank

    hi All
    I am facing problem with crystal report
    1>I created a report on my system, it is working fine on my system. But when I copy that rpt file to user system, it gives blan report always.
    Is this related any way to 'Save Data With Report' option under
    "File" menu in crystal report.
    2>I create report on my system and specify the data file which is
    in D:\XYZ folder. On user system also it force me to have the same location for datafile.
    Is there any way to specify at runtime to crystal report the path for datafiles?
    Thanx in advance.
    bye

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611
    The option "save data with report"saves the data of what is at that moment in the DB (or file) along with the report, without ever refreshing it.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164
    Thanx but it is not solved.l
    I am facing following problem with Crystal Report.
    I am using CR 8.5 and VB6 and the data is in mdb.
    I have created a report on my system which I am using for development.
    When I take the Report on my system, it shows correct data.
    While creating report, I have selected database as
    D:\ABC\tempfiles.mdb and a table from this.
    On users system, my app is installed in C:\xyz and rpt file
    is also available in C:\xyz.
    I have created a folder on D: as D:\ABC and copied
    tempfiles.mdb to D:\ABC.
    Logic of the program uses tempfile.mdb always from d:\abc.
    When I take the Report on user system, it shows blank.
    I checked the mdb there and table contains the records as per query.
    I am not able to figure our exact problem. Its very urgent for me.
    Can anyone please help me?

    The code for dispaying report is as under...

    CrystalReport1.ReportFileName = App.Path & "\AssoList.rpt"
    CrystalReport1.DiscardSavedData = True
    CrystalReport1.Destination = crptToWindow
    CrystalReport1.WindowState = crptMaximized
    CrystalReport1.ProgressDialog = True
    CrystalReport1.Action = 1

    Thanx in advance.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164
    surprised.
    I think this is a simple for you.
    This forum was of gr8 help to me in past but i am not getting help on this.
    Can some pls help me.
    Its very urgent
    pls

  5. #5
    Fanatic Member SkiNLaB's Avatar
    Join Date
    Jan 2002
    Location
    Sydney, Australia
    Posts
    747
    <rant>
    try the freakin REPORTING forum

    and MODS *** do u DO? isnt it ur job to move threads like this in the right place!?

    i know the reporting forum isnt the busiest, but if we keep moving threads, ppl will get the idea, and it would clean this forum up a bit!

    </end rant>

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164
    thanx for ur kind advice SkinLab.
    But tell me if u can answer this?
    I have tryied some reporting forums but not getting the correct solution.
    can any pls help me
    bye

  7. #7
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918
    Use the DataFiles() property to reference files in a different location. If your report only uses 1 table, it's easy:
    CrystalReport1.DataFiles(0) = "C:\XYZ\MyFile.mdb"

    If the report uses more than 1 table, you have to determine their ordinal position within the report and reference them accordingly. To find out their position within the report, open your report in Crystal, select Database|Set Location. The tables used by the report will be listed in their ordinal positions, so if your tables were listed as follows:
    Names
    Addresses
    Orders

    In this case:
    Names would be DataFiles(0)
    Addresses would be DataFiles(1)
    Orders would be DataFiles(2) and so on.

    If you only wanted to change the location of the Orders table, you would code:
    CrystalReport1.DataFiles(2) = "C:\XYZ\MyFile.mdb"

    Hope that helps.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  8. #8
    Frenzied Member
    Join Date
    Nov 2001
    Posts
    1,384
    I always use ODBC driver (DSN) when running crystal reports from VB with Access. That way you're not stuck having the database in the exact location.

    * Start|Settings|Control Panel|Administrative Tools|Data Source(ODBC)
    * Click 'ADD'
    * Choose Microsoft Access Driver
    * Specify a Name for you Data Source - this can be anything but must be the same on the devlopers machine as on the users machine, as this is what the crystal report will look for
    * Click 'Select Database'
    * Navigate to the correct location
    * OK
    * OK
    * OK

    In your crystal:
    * Choose Database from the menu
    * Click ODBC
    * Select the name you gave your datasource
    * Choose the tables you require
    Mel

  9. #9
    Addicted Member
    Join Date
    Apr 1999
    Posts
    178
    The first few pages of this document shows you how to change the location of a database for both the crystal ocx and rdc.

    http://support.crystaldecisions.com/...8-ocxtordc.pdf

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164
    Now i am using this code for report display.

    CrystalReport1.ReportFileName = App.Path & "\label_fixed1.rpt"
    CrystalReport1.DataFiles(0) = "C:\XYZ\TMPFILES.MDB"
    CrystalReport1.DiscardSavedData = True
    CrystalReport1.Destination = crptToWindow
    CrystalReport1.WindowState = crptMaximized
    CrystalReport1.ProgressDialog = True
    CrystalReport1.WindowShowRefreshBtn = True

    CrystalReport1.Action = 1

    BUT the Report is Blank. When I click the REFRESH button, It shows the correct data.
    Please help me in rectifying my problem.
    Thanx

  11. #11
    Addicted Member
    Join Date
    Apr 1999
    Posts
    178
    Did you install crystal reports service pack 2 yet?

    If not, you can get it here: http://support.crystaldecisions.com/servicepacks

    This might take care of your problem.

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164
    Thanx Ken
    I will try that.
    But Please tell me if i need to install the service pack on my development system or on user system or both.
    Thanx

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164
    Thanx Ken
    I will try that.
    But Please tell me if i need to install the service pack on my development system or on user system or both.
    Thanx

  14. #14
    Addicted Member
    Join Date
    Apr 1999
    Posts
    178
    On your development system.

    If your users have crystal reports loaded on their pc, then you would want to install on those pcs. If not, you want to compare all the crystal files in your install and see any newer ones were install with the service pack. If there are any, create a new install and include these new files.

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