No More Solutions

You can find a lot of debugging and deploying problems while developing applications in .NET and Visual Basic here. There are also some querying tips in SQL and typical source codes which might be useful shared here.

Data on report won't change

Problem : If you're using crystal report to design a report and the data displayed on the report won't change.

Solution : Go check the report. Open it, then make sure that on menu File -> Save Data With Report -> is NOT checked.

This is actually a minor problem, but sometimes, people forget or don't notice it.
Bookmark and Share

3 comments:

  1. alioke said...
     

    i have unchecked the "save Data With Report". But the problem is, the crystal report is won't show when i call it from VB...
    Thank's
    please reply to my email new_baru17@yahoo.com..
    Thanks for your help..

  2. alioke said...
     

    this is my code on vb...
    CrystalReport1.SQLQuery = "SELECT * from cetak_periksa"
    CrystalReport1.UserName = userDb
    CrystalReport1.Password = passDb
    CrystalReport1.Connect = cnStr
    CrystalReport1.ReportFileName = App.Path & "\report\cetakperiksa.rpt"
    CrystalReport1.PrintReport

    usually i use that script and it work,,,but why suddenly it didn't work...
    i ever get the same problem,,, but it solved by it self before i fixed it (i mean it fixed automatically without me)

  3. Steven Luck said...
     

    Hmm, what kind of connection do you use for the report? I usually use either stored procedur (ODBC), or TTX. I prefer using TTX, it is more flexible.
    You can see how to use TTX on my earlier post : http://programmerslab.blogspot.com/2009/04/connecting-crystal-report-and-vb-using_14.html.

    Set rs = New ADODB.Recordset
    rs.Open "select CustomerID, CompanyName, ContactName from customers where customerid like 'A%'", conn, 1, 3
    With CrystalReport1
    .Reset
    .Connect = conn
    .SetTablePrivateData 0, 3, rs
    .ReportFileName = App.Path & "\rptTest.rpt"
    .WindowState = crptMaximized
    .Destination = crptToWindow
    .WindowShowPrintSetupBtn = True
    .WindowShowSearchBtn = True
    .WindowShowRefreshBtn = True
    .WindowShowSearchBtn = True
    .Action = 1
    End With

    This is how I do it with TTX. Remember, if you use TTX, the fields in the .TTX file must be exactly the same as in the datasource.

Post a Comment