Crystal Reports - Urgent help required 
Author Message
 Crystal Reports - Urgent help required

The way it works:

A VB 4.0 program executes a SQL statement and populates an Access Table.
A Crystal Report is then called that has been build on the Access Table
just populated.

Problem 1:

The Crystal report, called from VB, is not refreshing.  It always shows
the same data and not the data just placed in to the Access Table table
- Why?

Problem 2:

On occassions, a number field is displayed as a very large number when
in fact the number is only 2 digits long - Why?

How Do I ?

Instead of placing my data in to an Access table and have Crystal
reports based on the Access table I would like crystal reports to be
based on the results of my VB recordset object.  I don't seem to be
able to do this - any suggestions ?

Any help with these problems would be very much appreciated!

Many thanks in advance

Martin

--
mpc



Wed, 03 Jan 2001 03:00:00 GMT  
 Crystal Reports - Urgent help required

Quote:

> The way it works:

> A VB 4.0 program executes a SQL statement and populates an Access Table.
> A Crystal report is then called that has been build on the Access Table
> just populated.

> Problem 1:

> The Crystal report, called from VB, is not refreshing.  It always shows
> the same data and not the data just placed in to the Access Table table
> - Why?

> Problem 2:

> On occassions, a number field is displayed as a very large number when
> in fact the number is only 2 digits long - Why?

> How Do I ?

> Instead of placing my data in to an Access table and have Crystal
> reports based on the Access table I would like crystal reports to be
> based on the results of my VB recordset object.  I don't seem to be
> able to do this - any suggestions ?

> Any help with these problems would be very much appreciated!

> Many thanks in advance

> Martin

> --
> mpc

Hi Martin,

A lot of questions but let's see what we can do.

1)  If the report is not refreshing with the proper data, check two things.
Open the report in te Report Designer and go to File.  There is an option
for Save Data with Report, make sure this option is unchecked.  If it is
checked, it will save the data inside the report from the last time you ran
it in the designer.  It will not hit the database and refresh the data.
Another common reason for this is to make sure the report is pointing to the
proper database at runtime.  You may need to use the DataFiles property to
point the tables to the proper MDB.

2) Not sure why.

3)  The best way to report directly off of your recordset is to bind your
recordset to a Datacontrol and the Crystal OCX can bind to the datacontrol
as well and report directly off of the datacontrol.  A better way though is
to get Crystal 6 and this will allow you to report directly off of ADO, RDO
or DAO objects.

--
Sincerely,
Brian Dong

To reply, remove nospam from the address.



Sun, 07 Jan 2001 03:00:00 GMT  
 Crystal Reports - Urgent help required
You save option is with 'Save data with report'.
Try using some of the following code:
it will check if the report has saveddata and then do a refresh
Hope it works
Regards SP

--
Public Sub ReportSetup()
   Dim result%, mainjob%, dialogflag%, resultlong&

    Dim JobInfo As PEJobInfo, TempText$
    Dim LogOnInfo As PELogOnInfo
    Dim Loginfo As PELogOnInfo
    Dim RepExport As PEExportOptions
    Dim RepGetOption As PEExportOptions
    Dim PrintData As Printer
    Dim curprinter%, defprinterpos%, tablenr%
    'Dim Mode As crDEVMODE
    Dim HasSavedData As Long
    Dim rcode As Long
    Dim varExportPath As UXDDiskOptions
    ' Define size of JobInfo structure
    JobInfo.StructSize = PE_SIZEOF_JOB_INFO

    result% = crPELogOnServer("PDSODBC.DLL", UCase(varServername), "",
UCase(varUserid), UCase(varPassword))

    Jobnum = PEOpenPrintJob(RepSourceFile)
    If Jobnum = 0 Then
        PEClosePrintJob Jobnum%
        PECloseEngine
        Exit Sub
    End If
    tablenr% = PEGetNTables(Jobnum%)
    'result% = PEGetNthTableLogOnInfo(Jobnum%, tablenr%, Loginfo)

    ' If this is the pro edition, do the SavedData test
    result% = PEHasSavedData(Jobnum%, HasSavedData)

    ' If there is saved data, give the user the option of using or
    ' discarding it

    If HasSavedData <> 0 Then
        result% = PEDiscardSavedData(Jobnum%)
    End If
     ExportReport
End Sub
----



Quote:

> The way it works:

> A VB 4.0 program executes a SQL statement and populates an Access Table.
> A Crystal report is then called that has been build on the Access Table
> just populated.

> Problem 1:

> The Crystal report, called from VB, is not refreshing.  It always shows
> the same data and not the data just placed in to the Access Table table
> - Why?

> Problem 2:

> On occassions, a number field is displayed as a very large number when
> in fact the number is only 2 digits long - Why?

> How Do I ?

> Instead of placing my data in to an Access table and have Crystal
> reports based on the Access table I would like crystal reports to be
> based on the results of my VB recordset object.  I don't seem to be
> able to do this - any suggestions ?

> Any help with these problems would be very much appreciated!

> Many thanks in advance

> Martin

> --
> mpc



Sat, 13 Jan 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. crystal reports help required

2. Crystal Reports Export DLL requires pointer - HELP!

3. Crystal Reports: Help required in defining one-to-many relationship on db schema

4. Crystal Reports ! Urgent Help

5. Help pls - Crystal Reports/ Access/ VB - Urgent

6. URGENT....Crystal Reports HELP

7. Interesting problem - Crystal report - URGENT HELP NEEDED

8. URGENT HELP ON PRINTING IN CRYSTAL REPORTS

9. URGENT HELP PLEASE - Crystal report blank page problem

10. Urgent!!! Help on Crystal Reports

11. Crystal Reports Help - Urgent

12. Visual Basic With Crystal Reports - Urgent Help Please!

 

 
Powered by phpBB® Forum Software