Академический Документы
Профессиональный Документы
Культура Документы
com
dsict.com
VS.NET
NameSpace
$
#
SQL Server
Login
SQL Server
Connect #
SQL Server
+ ,
-.*
"
& )
"
!
# & $'()
1!
0 -.*
"-
:;
$/)
23
4 /5
85 # & 95
1! 6 - . *
Application.StartupPath
5 # & 95
"-
<
*
= >#?
G 6
Viewer
1! 6
4
@AB #
1! F
< #
<C% D 4
G=
"
$ /)
5 5 5 85 # & 95 #
"
-.*
crystalReportViewer.ReportSource
crystalReportViewer.ReportSource = RepPath;
H E5
"$ )
-&
KE Connection
"
ConnectionInfo
.*
4
$ 6 EF
3J>
ConnectionInfo
- . * UserID,DataBaseName,Password
7
http:// www.DSICT.com
dsict.com
H *
crystalReportViewer
< #
ConnectionInfo
G=
"7
7-
C#
; 5 5 95 L #
" &
7-
C#
E Page_Load
D 4
;85 95 L #
" &
E Page_Init
D 4
http:// www.DSICT.com
dsict.com
& )O
1! SQL Server
G5 Q L
"
SQL Server
-& )
) G5 Q T #
"
2N 6
$ 6E F
ReportDocument P
ConnectionInfo
7-
23
Login
. F #
RS L -
$/)
2(
RS F G
4 / ReportDocument P U V* #
"-
23
:;
4 /5
85 # & 95
1! 6 - . * #
Application.StartupPath
5 # & 95
"-
<
*
= >#?
G 6
Viewer
1! 6
4
@AB #
1! F
# ReportDocument P
< #
F #
< 4
G=
"
"-
RepDoc.Load(RepPath);
"- &
<C% D 4
G 6
ReportDocument P G =
Viewer
crystalReportViewer.ReportSource = RepDoc;
H *
R X * 'KE $ 6E
ConnectionInfo
"-
4 .*G 3
SetLogin
{
Tables tables = reportdocument.Database.Tables;
http:// www.DSICT.com
dsict.com
foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
{
TableLogOnInfo TbLogonInfo = table.LogOnInfo;
TbLogonInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(TbLogonInfo);
}
}
7-
C#
; 5 5 95 L #
reportdocument)
{
Tables tables = reportdocument.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table table in
tables)
{
TableLogOnInfo TbLogonInfo = table.LogOnInfo;
TbLogonInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(TbLogonInfo);
}
}
7-
C#
;85 95 L #
reportdocument)
{
Tables tables = reportdocument.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table table in
tables)
{
TableLogOnInfo TbLogonInfo = table.LogOnInfo;
TbLogonInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(TbLogonInfo);
http:// www.DSICT.com
dsict.com
}
}
&
2 3
4 Y
":$
6 VS.NET '
RKX * 'KE # & Z
% VS.NET '
4
T
4
G 6
#&
&
' 4 /
G 6
#&
K[ ;
C G
"
ReportDocument RepDoc = new ReportDocument();
string RepPath = Application.StartupPath + "\\CrystalReport .rpt";
RepDoc.Load(RepPath);
crystalReportViewer .ReportSource = RepDoc;
//------------------------------------------ParameterValues parameterValues = new ParameterValues();
ParameterDiscreteValue parameterDiscreteValue = new
ParameterDiscreteValue();
parameterDiscreteValue.Value = "ParameterValue";
parameterValues.Add(parameterDiscreteValue);
ParameterFieldDefinitions parameterFieldDefinitions =
RepDoc.DataDefinition.ParameterFields;
ParameterFieldDefinition parameterFieldDefinition =
parameterFieldDefinitions["ParameterName"];
parameterFieldDefinition.ApplyCurrentValues(parameterValues);
http:// www.DSICT.com
dsict.com
& )
G \ #
:
"
Z 1!
^ ) 5
3X# B
L #
; X# B
F 5
"
&
5
4
1! B
)#&
Z 1!
. F
D Z 1! $) #
String a
# B
! G=
G 6
Select Expert
" 0
#&
[ *#&
G
&
#
5
http:// www.DSICT.com
dsict.com
& SubReport
O HE
* c
bV
Connect
1!
"
, , [5"
2( DataBase
1! B
& SubReport
2=
-.*
T
Q
SubReport
" & `W
"
0 #
ConnectionInfo "_
@AB
Z 1! 6 "
-6
Login H * L
'/ Report #
"d
http:// www.DSICT.com
dsict.com
}
}
"- &
` W SubReport #
F & G = "e
{
SubreportObject SubreportObj = (SubreportObject)RepObj;
ReportDocument SubReportDoc =
SubreportObj.OpenSubreport(SubreportObj.SubreportName);
SetLoginMainReport(connectionInfo, SubReportDoc);
}
}
}
}
4 / 2
) %F -
) %
H *5 G= "
"$
http:// www.DSICT.com
dsict.com
DataSet Z 1! G (*
< *
2( DataBase
#
& )
T DataSet
C6 4
1!
1! G (*
1!
Q *"
"
!
"
0 #
1! 5
F 5
DataSet P
Add Connection
, $ 6E F
L' $
& 95
Connection L a5
Server Explorer #5
"
8A
#
"_
http:// www.DSICT.com
dsict.com
" & `W
1! Add #
58A
5
DataSet
L'
8A
>
` %
4 . * Mc "
95 #5
Solution Explorer
5 5 # & 95 #
"
>
58A
XML Schema
G = "d
New Item
85 # & f5 #
http:// www.DSICT.com
dsict.com
#5
8A
>
G5 Q Solution Explore $ 6E
"
1! Add #
5
"
8A
L'
Solution Explorer
Crystal Report
>
` %
1! Wizard
&
Dataset .xsd
95 #5
58A
G = "e
G= "
New Item
20
& "g
http:// www.DSICT.com
dsict.com
Available Data $ 6E
tree 4 /
"h
Source
"
2=
"
&B
&B 1
>
` %
(*
# V #&` % *
"
&B
L ' Next #5
)
Finish
"i
http:// www.DSICT.com
dsict.com
"
95
>
Mc
"j
http:// www.DSICT.com
dsict.com
IDataReader Z 1! G (*
!
k*
DataReader P
) DataReader P
F
S &"
"
:
. F #
Windows a
`5 95
Mc "
.NET # & 95
DataSet
Interface L
W 95
Class Libarary a
" 6
B k*
T $3
) IDataReader; IDataReader
Multi Tier 6
G5 95
5
`5 95
Calss_.cs #
-& )
$ 6E
) Solution
Explorer
5 Application
:Class Libarary;
http:// www.DSICT.com
dsict.com
SqlConnection SQLCon = new SqlConnection(ConStr);
SQLCon.Open();
SqlCommand SQLCommand = new SqlCommand("SELECT * FROM
TbPersonal", SQLCon);
IDataReader iDataR = SQLCommand.ExecuteReader();
return iDataR;
}
Build
"$
1! 5
)
DLL L
":
Crystal - T L 5
Build #
V;
$
&B "
c6 > ) Output
Available Data $ 6 E
Q Connection F )
"_
8A
DLL 6
L ' :Application; G5 95
"
"$) - & )
#5
8A
Z 1! Wizard
#5
"
Report
20
& "d
Node ]
tree 4 /
"
Source
8A
"e
http:// www.DSICT.com
dsict.com
"
"
23
8A
DLL 2 % ADO.NET ` %
(*
&5
G= "
"g
http:// www.DSICT.com
dsict.com
& '%4 / ,
"$
&B
20
"h
l A
Class
+ , G = :ALL
V m; $
Q A
#& '%
V*
D <) HE 5
4 /
" &
1! * 6
:Application; G5 95
G = "i
"
http:// www.DSICT.com
dsict.com
'"
( )*
! "#
$%
&
"
G = "-
+ ,
CR
?* Setup
#5
& )
-& )
http:// www.DSICT.com
dsict.com
)$
bV 5
k( L *
* 4 / Merge Module
"
$%
Business Object
Crystal Reports jn
"_
Crystal Reports _ n
"
"d
http:// www.DSICT.com
dsict.com
CR For VS.NET
CR For VS.NET
"e
d "
http:// www.DSICT.com
dsict.com
VQ
o T
B 4 3J> k6 #
http://support.businessobjects.com/downloads/merge_modules.asp
#5
0 F
A[ 4
#
1! = > q :$6& D -
&#
$!
0%;
[5
7
"$
1&
F s 6 t 1 # & 1% `
r [
5 $6
<C%; $6
Z 1! # &
-& %
A[ #
*
#
TZ
T "_
1! s 6
& "
": 6& 0
"$
"
E5 T #
D
% "d
95 $ E "e
""" 5 "
"
5
k Q
"
T # & Merge Module 5
?*
E
T A6 F )T
A6
A6 F
1 .NET #
7
% V A6
* K3 .NET #
CrystalReports___maps.msm
CrystalReports___RDC_Designtime.msm
CrystalReports___RDC_License.msm
CrystalReports___RDC_Reportengine.msm
CrystalReports___RDC_Runtime.msm
" BZ
%D 40
` 5
http:// www.DSICT.com
dsict.com
Doc % &' !
3,
! )*
. /&-
&
! " #$
!
01
Doc % +
&