Tuesday, June 2, 2009

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.


  1. 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...
    please reply to my email new_baru17@yahoo.com..
    Thanks for your help..

  2. 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"

    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. 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
    .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.



Related Posts

Dual Axis not Working in Tableau

Problem : When creating chart with Dual Axis, Synchronize Axis is disabled and cannot be clicked. Cause : Tableau identified this as ...

About Me

My photo
Is an ordinary unNoticed man, with a little knowledge to share and high dreams to achieve. I'd be glad if I can help others, 'coz the only thing for the triumph of evil is for a good man to do nothing. I like English and Chinese language, and know a little about them. Hence, for me, most things can best be expressed in Chinese, some in English, and the rest in others ^^

About Blog

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.

Popular Posts



Follow by Email