473,586 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Login Problem with CrystalReports

73 New Member
Hi Experts,

In my VisulaStudio200 8 c#.net windows Apllication i have a crystalReport(M ain) it have 5 subreports.
i did this report in my local machine so i gave datasource, database name and other credentials i set as local only
but from coding i set database login details dynamically to get data from required source
my code is like this

Expand|Select|Wrap|Line Numbers
  1. ShiftSummaryReport  report = new ShiftSummaryReport(); 
  2. ReportDocument crSubreportDoc; 
  3. Sections crSections; 
  4. ReportObjects crReportObjects; 
  5. SubreportObject crSubreportObject; 
  6.  
  7. report.SetDataSource(shiftSummaryDataset.Tables[0]);
  8. report.SetDatabaseLogon(user, password, server, database);
  9. crSections = report.ReportDefinition.Sections;
  10. foreach (Section crsection in crSections) 
  11. {
  12. crReportObjects = crsection.ReportObjects;
  13. foreach (ReportObject crreportobject in crReportObjects) 
  14. {
  15. if (crreportobject.Kind == ReportObjectKind.SubreportObject) 
  16. {
  17. crSubreportObject = (SubreportObject)crreportobject; 
  18. crSubreportDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
  19. crSubreportDoc.SetDatabaseLogon(user, password, server, database);
  20. }
  21. }
  22. }
i kept debug and checked, values coming to those variables and executing fine.
but still it is asking for database login.
how can i solve this?
please help me out


Thanks In Advance
--Naren
Jul 14 '09 #1
0 1082

Sign in to post your reply or Sign up for a free account.

Similar topics

2
11051
by: Jason | last post by:
I doing some testing with security and ran into the following problem. I want to log into the SQL server (from Query Analyzer) using my domain account. To allow this, I went into Logins section in Enterprise Manager and added my user account as a Windows User. If I set Analyzer to use Windows authentication I am to log in with no...
0
1407
by: Tim T | last post by:
Hi, I have a web application that has a number of users who administer their own data... i have several pages that check to see if a valid userID session exists, and if not, send them to a Login.aspx page (where a userID session is generated upon successful login). my pages are user specific, so each page will load data specific to that user...
2
1808
by: A.M | last post by:
Hi, I am using WebForms authentication. What would be the best way to prevent two person login with same userID at the same time? Thanks, Alan
0
984
by: Rey | last post by:
Howdy all. Using VS.Net 2003 on an XP Pro SP2 box, I'm geting an err: CS1026: ) expected Project is just a simple report w/data from an access mdb to see how it works on a web form using C#. Crystalreports viewer works in a winform but so far - for me - not in a web form... In design, the data can be previewed but get err when...
18
3381
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site relies on subscrption fees. Sessions ID's are matched between the browser and the server. So a users can login with same username and password...
2
4263
by: ad | last post by:
I use login control of VS2005 in my web application. The web applicaiton is developed in my notebook. It run ok in my notebook, but when I login in from another PC with the user ID and password, it can't login in. I tried again and again. When I login with incorrect password, the login control display the FailureText. But when I enter the...
9
2395
by: ad | last post by:
I used login Controls of VS2005 to develop Web application. My program will check password and user ID in login.aspx. If the password is wrong, my program will display an "password is wrong" message to user. If the ID and password are correct, my program wiill transfer to home.aspx After my program deployment to server, when user login...
1
2082
by: alexseow | last post by:
How to prevent double login with same account? , hv any ideas? thanks
2
7939
by: Jive Dadson | last post by:
Hey folks! There are various web pages that I would like to read using urllib, but they require login with passwords. Can anyone tell me how to find out how to do that, both in general and specifically for YouTube.com. Thankee.
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.