Click here to Skip to main content
11,639,554 members (59,621 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 26-Jun-11 16:09pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
obhasha07 at 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'.'
MaulikDusara at 27-Jun-11 7:07am
   
you need to reconnect the database for this report. And verify the columns
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Try to set database location at runtime, e.g.

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


I think this may help you....
  Permalink  
Comments
Neetin_1809 at 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)

  Print Answers RSS
0 Suvendu Shekhar Giri 330
1 Sergey Alexandrovich Kryukov 269
2 CPallini 177
3 himanshu agarwal 167
4 F-ES Sitecore 160
0 OriginalGriff 9,081
1 Sergey Alexandrovich Kryukov 8,812
2 Mika Wendelius 7,027
3 Suvendu Shekhar Giri 2,650
4 F-ES Sitecore 2,548


Advertise | Privacy | Mobile
Web03 | 2.8.150731.1 | Last Updated 28 May 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100