Answered by:
crystal reports data source in design sql in runtime mdb?

Question
-
hi everyone,
i have a crystal reports designed with datasource from ms sql 2008 server. But in runtime there is an option to use mdb as datasource. Now my question is is there an opportunity to use mdb as datasource to connect this report file? tables names and columns names are identically in mdn and sql db.
here a picture from designmode
and here a line of code i use in runtime for mdb connection but it's not working .
TableLogOnInfo logOnInfo; ConnectionInfo connectionInfo=new ConnectionInfo(); connectionInfo.Type = ConnectionInfoType.CRQE; connectionInfo.ServerName = connectionInfo.DatabaseName = Snelfactuur.dbProfile.AbsolutePathMDB; connectionInfo.UserID = null; connectionInfo.Password = ""; // connectionInfo.AllowCustomConnection = true; connectionInfo.IntegratedSecurity = false; foreach (Table table in cryRpt.Database.Tables) { table.LogOnInfo.ConnectionInfo = connectionInfo; logOnInfo = table.LogOnInfo; logOnInfo.TableName = table.Name; table.ApplyLogOnInfo(logOnInfo); table.LogOnInfo.ConnectionInfo.LogonProperties.Clear(); table.LogOnInfo.ConnectionInfo.LogonProperties.Add(new NameValuePair2("Database Name", connectionInfo.ServerName)); table.LogOnInfo.ConnectionInfo.LogonProperties.Add(new NameValuePair2("Database Type", "Access")); }
Any suggestions are welcome
thanks by advance
Student
- Moved by Jason Dot Wang Friday, April 19, 2013 2:31 AM This thread is about ASP.NET
Thursday, April 18, 2013 8:05 AM
Answers
-
Hi Djramc,
Welcome to MSDN Forum Support.
You are more likely to get more efficient responses to Crystal Report issues at http://scn.sap.com/community/crystal-reports-for-visual-studio/content?filterID=content~objecttype~objecttype%5bthread where you can contact Crystal Report experts.
Jason Wang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Carey FrischMVP Friday, April 19, 2013 5:08 AM
- Marked as answer by Just Karl Friday, October 11, 2013 2:34 PM
Friday, April 19, 2013 2:30 AM
All replies
-
Hi Djramc,
Welcome to MSDN Forum Support.
You are more likely to get more efficient responses to Crystal Report issues at http://scn.sap.com/community/crystal-reports-for-visual-studio/content?filterID=content~objecttype~objecttype%5bthread where you can contact Crystal Report experts.
Jason Wang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Carey FrischMVP Friday, April 19, 2013 5:08 AM
- Marked as answer by Just Karl Friday, October 11, 2013 2:34 PM
Friday, April 19, 2013 2:30 AM -
Thank you for moving this thread to the correct area.
Student
Friday, April 19, 2013 5:28 AM