Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports 10 Capabilities 1

Status
Not open for further replies.

ching0418

MIS
Mar 6, 2002
96
HK
I'm lost!

1. Is it possible to view crystal reports, created in Crystal Reports 10, called through an ASP page? If yes, how? I used CR 7 before, and calling a report is as simple as specifying the location and report name. But now, it doesn't work.

2. How is it possible to create a report with drillthroughs? For example a total of deliveries for all the countries, and the user can just click all countries to be more detailed where deliveries per country will be displayed...and so on....


please help me....i'm stuck here for almost 3 weeks...

thanks in advance!
 
Hi

Not sure I understand your query?

1) Do you mean navigate to a report using the web?
2) Once again, not sure what you mean, maybe give an elaborate example, but do you not just mean to hide the section (as opposed to surpress), on which the cust can then drill down?



EO
Hertfordshire, England
 
hello eo,

for q #1: I want to display a report from ASP. For example I have a a link for all the deliveries, and when I click the link, it should display the data of the Deliveries in report format. The report is already created. In CR7, I just have to specify the location and report name. But in CR10, it doesn't work. A dialog box for opening or saving file appears.

for q #2: I think you have answered my question. Thanks!

Please help me with my 1st problem. Thanks!
 
I tried that even if i'm using professional edition only. I tested SimplePreviewReport.asp calling SimplePreviewReport.rpt. It's working.

But when I change the report name, to my own report, it says:

Error Occurred Reading Records: Logon failed. Details: 28000:[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.

Does my edition of CR has something to do with this error?
 
No, it means you're not passing the logon information for your report to connect to your SQL Server. Look at the 'SimpleSetLogonInfo' example:

'Create a reference to the tables collection of the main report
Set mainReportTableCollection = Session("oRpt").Database.Tables

For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties
.Item("user ID") = "UserID"
.Item("Password") = "Password"
.Item("DSN") = "DSN_Name"
.Item("Database") ="DatabaseName"
End With
Next

-dave
 
wow! thanks vidru for that help...you saved me...I'm giving you a star for that!

ching
 
Vidur,

I have the same problem as ching0418 had."Logon failed error".

I have used your few lines of code with the appropriate log in information but it still throws me an error.

I have inserted you code right after I have opened the report to view and before the records are read...

Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
'This line uses the "PATH" and "reportname" variables to reference the Crystal
'Report file, and open it up for processing.

If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
End If

'Create a reference to the tables collection of the main report
Set mainReportTableCollection = Session("oRpt").Database.Tables


For Each mnTable in mainReportTableCollection
With mnTable.ConnectionProperties
.Item("userID") = "username"
.Item("Password") = "password"
.Item("DSN") = "DSN name"
.Item("Database") ="xxx"
End With
Next


session("oRpt").ReadRecord 'THIS STEP THROWS THE ERROR

Any suggestions?

Thanks,
Deeaj

 
Typo? The method is ReadRecord[red]s[/red] (plural).

-dave
 
Vidru,

yes , it is a typo. I have ReadRecords typed right in the code.

-Deeaj
 
What type of database, what version of CR, and how are you connecting (ODBC, Native, etc.)?

-dave
 
Vidur,

Let me explain what situation I have.
I do get this error "Error Occurred Reading Records: Logon failed."

But I am using DB/2 database on AS/400 . I create reports using Crystal Reports Developer edition 11 via jdeDirect ODBC driver to connect to the JD Edwards backend.

Does this change the logon information that I need to pass?

Thanks,
Deeaj


 

I don't think the aspxmps11.exe is any different from the previous versions , except that a few DLLs have changed. The code is the same.


I am using the same code that you are talking about. That code runs great with the example report "SimplePreviewReport.rpt" that is being used.

But the issue started when I tried to run the report that I created. It started asking for login information.

The sample report that the code uses, runs using Access database that resides locally on the system and it doesn't require any log in information , I guess.


But the database that I use resides on AS/400 and the ODBC driver requires a log-in information to authenticate me against user log-in information maintained in the database.

That is where it fails coz I don't see anywhere in the example code the log-in information being passed. That is when I copied your few lines and expected it to work. It failed even with that.

Any help is greatly appreciated.

-Deeaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top