Who can help me?

R

rock

Hi All,
i need to create a report,based on 4 tables,over 300
fileds.but dataset only support 100 fileds, so i have to
use OLEDB(ADO).
Now the name of database changed,ex: change "pc_sys2003"
to "pc_sys2004",but the tables is not changed.
how should i write the codes?
the foolowing is right if the database's name is not
changed:

Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine

Dim qds As New ReportDocument
Dim lli As New TableLogOnInfo
Dim ttb As Table
qds.Load(Application.StartupPath & "\CrystalReport5.rpt")
For Each ttb In qds.Database.Tables
lli = ttb.LogOnInfo
With lli.ConnectionInfo
.ServerName = RTrim(ServerName)
.DatabaseName = RTrim(CurServer)
.UserID = RTrim(UserName)
.Password = RTrim(PassWord)
End With
ttb.ApplyLogOnInfo(lli)
Next ttb
CrystalReportViewer1.ReportSource = qds

by the way,it's no use if i change the "CurServer"
and i must change servername in Crystal Report Design Mode
what i want to know is how should i write these codes in
programme?

thanks a lot!
 
J

Jeremy Cowles

This question is off topic here, please try one of these :

news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet
or
news://msnews.microsoft.com/microsoft.public.dotnet.framework.windowsforms
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top