on 2014 May 13 10:43 AM
hello all
i have many reports created by someone else on his own machine using same database file i use
my application use Visual studio 2013 win form with crystal report pack 9
i use rpt files provided to me
connect database use OLEDB
to show form i use below code
SQLstr = " select what ever from table " ' defined as Public
reportName = rpt file path & report name
showReport()
public sub showReport()
reportTable.clear() ' defined as Public
DBAdapter = new oleDpdataAdapter(SQLstr,DBconnection)
DBAdapter.fill(reportTable)
dim rptDoc as new Crystaldesicin.crystalreports.Engine.ReportDocument
rptDoc.load(reportName)
rptDoc.setdatasource(reportTable)
formRpt.RptViewer.reportsource = rptDoc
formRpt.showdialog()
now
when i use one table report with (select from one table) >>>>> works perfectly
but when i use report retrieve data from 2 tables and group data like using
SQLstr = " select 'table'.'coulumn', 'table2'.'column' ....... etc
from 'table1'
INNER JOIN 'table2' ON 'table'.'coulumn' = 'table2'.'column'
it's not working and formrpt shown but asking for database login
I noted that in database login window : server name refer to ORIGINAL DATABASE USED BY Report Creator not to my local database
================================================
i tried to set
rptDoc.datasourceconnection.item(0).setconnection("","databse file path and name", False)
rptDoc.datasourceconnection.item(0).setlogin("admin","")
but the same
using dataset instead of reportTable the same error
================================================
what i missed in this type of reports?
( apologize about long take and poor English )
Request clarification before answering.
Hi
Please have a look at the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many Thanks Mr. Ludek
Tutorial 2 – Using a single DataSet and Multiple Tables on page 11 solved my issue
User | Count |
---|---|
76 | |
29 | |
9 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.