Solved

Crystal Rpeort ASP C#

Posted on 2012-04-06
13
380 Views
Last Modified: 2012-06-27
Report LayoutAll,

I am creating an asp website (for the first time) and need to know how I can include each SQL parameter for each record in a SINGLE Page. Please see the attached screenshot.
When I add Crystal Report Viewer and use the Wizard, it designs ALL records vertically along with their headers.
I need to have each record in a single page for employees to sign on the paper for each report. I created a search textbox that user can input a customer number and I need to have a report to ONLY show the information in 1 PAGE for that particular number along with its other information.
For instance, for Customer number 1 record in SQL which also includes (Date, PO  Num, Cmment, etc) there would be ONLY 1 page for that specific customer information.
PLEASE see the attachment.

Thank you,
Paul
0
Comment
Question by:pauledwardian
  • 7
  • 6
13 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 37818021
The way to do this is to have the user sign in and determine his id.
You can then pass that to the report as a parameter and select that user's information based on the id.

An FYI - Is this an in-house appliction to be used by employees of you company?  
or is it to be on the net with outside people using it?

If the latter, then you need special licensing from SAP/Crystal to use the reports in that manner.  I don't know exactly what it is so you will need to contact SAP/Crystal

mlmcc
0
 

Author Comment

by:pauledwardian
ID: 37818048
mlmcc,

That is not my question.
I am asking how can I change parameters so each row of sql values print in one page in sql report.

Customer1 info in row 1 in page1
Customer2 info in row 1 in page2
Customer3 info in row 1 in page3
etc...
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37818178
Assuming you have the report grouped by cutomer id you can use the NEW PAGE AFTER in the group footer or new page before on the group header.

Right click the GROUP HEADER in the left margin
Click SECTION EXPERT
Click the FORMULA BUTTON to the right of New Page Before
Enter this
   Not OnFirstRecord

That way you won't get a blank page for page 1

mlmcc
0
 

Author Comment

by:pauledwardian
ID: 37818508
I figured that out.
Now..
How can I stop Crystal asking user for putting the server information everytime they are tyring to search the parameters. I used this code but it didnt work. I have SQL developer version:

ReportDocument crystalReport = new ReportDocument();
        crystalReport.Load(Server.MapPath("CrystalReport.rpt"));
        crystalReport.SetDatabaseLogon
            ("ASPNET", "ASPNET123", @"192.168.1.1", "CSDatabase");
        CrystalReportViewer1.ReportSource = crystalReport;
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37819490
Are they pulling the parameter information from the same database as the report?

What version of Crystal?
That looks like an older method of passing the logon information.  I haven't written a generic application so I am not that familiar with the methods plus all my applications have been in VB6 so the method is different.  

mlmcc
0
 

Author Comment

by:pauledwardian
ID: 37819687
Yes, the report is pooling the information from the same database.
And it is the latest crystal report version.
So, any suggestion.......
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 100

Expert Comment

by:mlmcc
ID: 37819761
0
 

Author Comment

by:pauledwardian
ID: 37820323
Do you think it would solve the problem if I add a generic AD Group into SQL users and give that group Full permission to database. Then add the users AD to that group would solve the problem?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 37820331
We solved this by using integrated security so the reports could use Windows login.  IN that way all users had permissions tothe database, we put them into a single group and gave the group permissions to the views and stored procedures but not the tables themselves.

mlmcc
0
 

Author Comment

by:pauledwardian
ID: 37821902
Do you know if it would be possible to include the username and pass in web.config like the sqlstring?
Also, can you provide a C# code? I am not familuar with Vb.net
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37821952
I don't know C# and haven't seen many examples.

Why would you want to include the username and password in an open file?

mlmcc
0
 

Author Comment

by:pauledwardian
ID: 37822231
Can anyone help with the C# code please?
0
 

Author Closing Comment

by:pauledwardian
ID: 37830519
Never-mind, I use the integrated security.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now