Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm having a problem with my crystal report. The report displays perfectly on my computer but does not work on any other computers. When displaying the report it gives a long error message. Sadly, I can't paste the whole error message because I'm sending this message from a different computer. However. The error says that something is wrong in one of my formula fields and also the field name is not known. But it works fine in my computer. Also, the error says something about a temporary report file as well.
Posted

i had the same problem and i notice that this error happens when i copy and paste elements from one subreport to another.
Hope this solve the problem
 
Share this answer
 
Hi obhasha07,

I have faced the same issue.

My report was working fine with the database source in which I have designed it. Then we decided to use different database name. I was providing the database name through config file, once I changed this database name I started getting the same error as you mentioned.

I resolved this by setting the database location as we required while executing it.

for that open ur report, select Database Expert, then select SetLocation option then create new connection and choose the database you are expecting while executing the report.

See if this works for you.........

http://www.tek-tips.com/viewthread.cfm?qid=493919[^]
 
Share this answer
 
Comments
obhasha07 27-Jun-11 3:00am    
hey buddy,
you're right. it is in the database!!! However, in my case, I tried doing as you told but it doesn't seem to work. Even more interestingly, the report gives me an error when I try to verify the database. It gives me this error:

DAO Error Code: 0xc26
Source: DAO.Fields
Description: Could not read definitions; no read definitions permission for table or query 'TechJobCapacity'.'
[no name] 27-Jun-11 7:07am    
you need to reconnect the database for this report. And verify the columns
Hi
try this solution

Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIN.Click
Dim strSQL As String = "DataPrinter"
myCom = New SqlCommand(strSQL, conn)
myCom.CommandType = CommandType.StoredProcedure
myCom.Parameters.Clear()

myCom.Parameters.AddWithValue("@FROMDMY", CDate(mskFROMDMY.Text))
myCom.Parameters.AddWithValue("@TODMY", CDate(mskTODMY.Text))

Dim da As New SqlDataAdapter
da = New SqlDataAdapter(myCom)
Dim dt As New DataTable
da.Fill(dt)

Dim objRep As New ReportDocument
objRep = New rptReport
objRep.SetDataSource(dt)

Dim objX As ReportObject
For Each objX In objRep.ReportDefinition.ReportObjects
If TypeOf (objX) Is TextObject Then
If objX.Name = "txtTHEHEAD" Then
Dim objText As TextObject = CType(objX, TextObject)
'objText.Text = ToWordVND(dt2.Rows(0).Item("SumAmount"))
objText.Text = lblTHEHEAD.Text
End If

End If
Next


Dim f As New frm_Report
f.CrystalReportViewer1.ReportSource = objRep
f.CrystalReportViewer1.Refresh()
f.CrystalReportViewer1.DisplayGroupTree = False
f.WindowState = FormWindowState.Maximized
f.Refresh()

f.Show()
Me.Cursor = Cursors.Arrow

End Sub




/****
STORE PROC IN SQL SERVER :

CREATE PROC DataPrinter
@FROMDMY datetime,
@TODMY datetime
AS
SELECT DATE_RECEIPT, MACT, SOCT, ONGBA, DIENGIAI, TKNO, TKCO, amount, MON, RECKEY
FROM DataStorage
WHERE DATE_RECEIPT>=@FROMDMY AND DATE_RECEIPT<=@TODMY
ORDER BY DATE_RECEIPT, MACT, SOCT
GO
 
Share this answer
 
Try to set database location at runtime, e.g.

VB
Dim re As New CRReport
 re.Database.Tables("DETAIL").Location = GlobalClass.destnPath & "\POWERFEE_REPORTDETAILS.xml"



I think this may help you....
 
Share this answer
 
Comments
Neetin_1809 23-Dec-14 6:25am    
Hello , I Am Facing the Same issue in the Reports In VS2008. i am Creating a Dynamic Group By For That.Its run well on Old DataBase But after changing the DataBase It Gives Error.The Field Name Is Not Known.We are Binding through xml file for file structure .Hope You Can Help it OUt On That Topic.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900