ultrafish
asked on
how to get parameter fields from ASP .NET to CR
Hi all,
I am writing a ASP .NET program (C#) to view a CR (8.5), and the CR takes a fews parameter fields, how can I use C# API to pass the parameter fields to CR to output the report?
one more question is, when I view the CR (directly), it will prompt for sql connection username and password, I have made a file dsn for the connection, and it prompt out for these info everytime I view the report, can I pass these fields by using ASP.NET API too? Thanks a lot!
I am writing a ASP .NET program (C#) to view a CR (8.5), and the CR takes a fews parameter fields, how can I use C# API to pass the parameter fields to CR to output the report?
one more question is, when I view the CR (directly), it will prompt for sql connection username and password, I have made a file dsn for the connection, and it prompt out for these info everytime I view the report, can I pass these fields by using ASP.NET API too? Thanks a lot!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
if I have to choose the datasource like
data.dsn
how can I choose it?
thanks~~~
data.dsn
how can I choose it?
thanks~~~
ASKER
also, I cannot find the method SetDatabaseLogon and SetParameterValue method
which library has to be imported?
and if I want to print directly, how can I do that? thanks
which library has to be imported?
and if I want to print directly, how can I do that? thanks
I have never needed to choose a dsn. I did a quick check and ReportDocument has a parameter:
reportDocument.SetDataSour ce(dsnSour ce);
Hope this helps. Thanks for the points ultrafish, this is my first accepted response (also my first day to be a member of EE). Good Luck.
reportDocument.SetDataSour
Hope this helps. Thanks for the points ultrafish, this is my first accepted response (also my first day to be a member of EE). Good Luck.
using CrystalDecisions.CrystalRe ports.Engi ne;
using CrystalDecisions.Shared;
Is "reportDocument" working at all for you?
What do you mean by printing directly?
using CrystalDecisions.Shared;
Is "reportDocument" working at all for you?
What do you mean by printing directly?
ASKER
is that only exist in 2003 and CR 9.0?
I am using CR 8.5 and VS.NET 2002 only, I don't have the method SetDatabaseLogon() and SetParameterValue()
I am using CR 8.5 and VS.NET 2002 only, I don't have the method SetDatabaseLogon() and SetParameterValue()
Ahhh, You weren't specific about your .Net development environment. You referenced CR 8.5 but I understand that as a reference to what version the reports were originally written in. I don't know if CR 8.5 components in 2002 would be similar to the code I posted. What I posted is from a working program in .Net 2003 with CR 9.0 (Crystal Decisions). Hopefully mlmcc's link will provide the information you need.
http://support.businessobjects.com/communityCS/FilesAndUpdates/csharp_web_samples.exe.asp
http://support.businessobjects.com/communityCS/FilesAndUpdates/csharp_win_samples.exe.asp
mlmcc