on 12-15-2011 11:52 PM
i have a project with VB.net 2010 / Entity framework 4. I have 2 tables :
Table1 Table2
id1 id2
name value
city date
id1
i want to display on report : value , date , Name
i can make the query to get records that i need to display on report ,
with report wizard , i have created the crystal report ( CrystalReport1.rpt ) with fields from both 2 tables : value date name.
Now , this is my code :
Dim report As New ReportDocument
report.Load("c:Crystalreport1.rpt" )
Dim context As New myEntities
Dim query = From t1 In context.table2 where ....conditions
Select t1.value , t1.date , t1.table1.nameu3000
report.SetDataSource(query.ToList)
Form1.CrystalReportViewer1.ReportSource = report
when the report is open , the columns value and date are filled with correct values , but the column name is empty.
What can i do ?
thank you.
Hi,
Take a look at the [Data connectivity sample applications for CR for VS 2010 .NET SDK|http://www.sdn.sap.com/irj/boc/samples?rid=/library/uuid/5050d3d0-19dd-2d10-ffb2-ddcd30a3e655].
Try implementing a test app using the above sample.
For more info take a look at [CR for VS 2010 Developer guide|http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip]
Hope this helps.
- Bhushan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a test; If you write out the (query.ToList) to an XML, then point the report in the CR designer at the XML, do you get the header? See [this|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13270] [original link is broken] [original link is broken]; blog for pointers.
Looking at [this|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20840] [original link is broken] [original link is broken]; blog may also be an idea. Not quite what you're doing, but...
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.