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

3 comments:

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

    ReplyDelete
  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"
    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)

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

    ReplyDelete

You may be intersted in

Related Posts

Updating Table Containing Xml Column via LinkedServer

If you are trying to update a table containing XML column via Linked Server in SQL Server, and you are not able to, you are not alone. There...

About Me

My photo
Is an ordinary 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.

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

Blogroll

Followers

Leave a Message