hi,
I am using Crystal Reports 8.5 and Visual Biasic 6.0, the technique that I
was using was I connect the database using the ODBC to the crytal reports and design my report by draging the fields to the reports.
In my new assignment I have to bind a ADODB recordset to the report at
run time.
I got 2 Problems.
01. How can I bind a ADODB recordset to the report at run time
02. After binding the recordset how can I add the fileds to the report
content area
A small help on this please.
Thank you.Dim conn As ADODB.Connection 'CONNECTION TO BROKER QUERIES
Dim rs As ADODB.Recordset 'HOLDS ALL DATA RETURNED FROM QUERY
Dim crystal As CRAXDRT.Application 'LOADS REPORT FROM FILE
Dim Report As CRAXDRT.Report 'HOLDS REPORT
Set conn = New ADODB.Connection
conn.Open "Provider=MSDAORA.1;User ID=scott;Data Source=qb;Persist Security Info=False", "sebsv4", "sebsv4pwd" 'THESE OPTION VALUES ARE BEST FOR VB
Set rs = New ADODB.Recordset
rs.Open q, conn, adOpenStatic, adLockReadOnly
Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
Set Report = crystal.OpenReport(App.Path & "\report1.rpt") 'OPEN OUR REPORT
Report.DiscardSavedData 'CLEARS REPORT SO WE WORK FROM RECORDSET
Report.Database.SetDataSource rs 'LINK REPORT TO RECORDSET
CRViewer1.ReportSource = Report 'LINK VIEWER TO REPORT
CRViewer1.ViewReport 'SHOW REPORT|||thanks for the quick reply sraheem
another small problem,
if I am using the report designer in VB like that, when I have draged a field name in to the report
it shows the field name as
field:<TableName>.<ColumnName>
now If I am doing the data binding at run time how can I add the recordset columns in to the report, since there is no data property on report fileds
Thanx.|||just capture report sections like below and add fields...
Dim crxdetail As CRAXDDRT.Section 'Section Decleration
Dim crxPageHeader As CRAXDDRT.Section 'Section Decleration
Dim crxPageFooter As CRAXDDRT.Section 'Section Decleration
Set crxdetail = Report.Sections.Item("D") 'Detail Section
Set crxPageHeader = Report.Sections.Item("PH") 'Detail Section
Set crxPageFooter = Report.Sections.Item("PF") 'Detail Section
crxdetail.AddFieldObject "{e." & rs(i).Name & "}", 1000, 0
where e is the report command object name or table name in your case.
Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts
Sunday, March 25, 2012
Tuesday, March 20, 2012
big problem on sqlagent
2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:20 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:43 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
i have to reboot server , restart sqlagent don't resolve this pb
have you ever see this pb '
excuse my language i'm frenchHave you checked your MDAC and SP levels?
I think I have seen that when the OS MDAC/Patches weren't synchronized with
the SS service packs. Quick search has too may hits to be useful, except
that it is some sort of buffer issue.
--
Joseph R.P. Maloney, CSP,CCP,CDP
"jytjyt" wrote:
> 2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
> 2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle d
u
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:20 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> 2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle d
u
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:43 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> i have to reboot server , restart sqlagent don't resolve this pb
> have you ever see this pb '
> excuse my language i'm french
>
2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:20 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:43 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
i have to reboot server , restart sqlagent don't resolve this pb
have you ever see this pb '
excuse my language i'm frenchHave you checked your MDAC and SP levels?
I think I have seen that when the OS MDAC/Patches weren't synchronized with
the SS service packs. Quick search has too may hits to be useful, except
that it is some sort of buffer issue.
--
Joseph R.P. Maloney, CSP,CCP,CDP
"jytjyt" wrote:
> 2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
> 2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle d
u
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:20 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> 2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle d
u
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:43 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> i have to reboot server , restart sqlagent don't resolve this pb
> have you ever see this pb '
> excuse my language i'm french
>
Labels:
2006-02-24,
c9chec,
database,
erreur,
jobmanager,
microsoft,
mysql,
odbc,
oracle,
server,
sql,
sqlagent,
sqlallochandle,
unable
big problem on sqlagent
2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:20 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:43 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
i have to reboot server , restart sqlagent don't resolve this pb
have you ever see this pb ?
excuse my language i'm french
Have you checked your MDAC and SP levels?
I think I have seen that when the OS MDAC/Patches weren't synchronized with
the SS service packs. Quick search has too may hits to be useful, except
that it is some sort of buffer issue.
Joseph R.P. Maloney, CSP,CCP,CDP
"jytjyt" wrote:
> 2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
> 2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:20 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> 2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:43 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> i have to reboot server , restart sqlagent don't resolve this pb
> have you ever see this pb ?
> excuse my language i'm french
>
2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:20 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:43 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
i have to reboot server , restart sqlagent don't resolve this pb
have you ever see this pb ?
excuse my language i'm french
Have you checked your MDAC and SP levels?
I think I have seen that when the OS MDAC/Patches weren't synchronized with
the SS service packs. Quick search has too may hits to be useful, except
that it is some sort of buffer issue.
Joseph R.P. Maloney, CSP,CCP,CDP
"jytjyt" wrote:
> 2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
> 2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:20 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> 2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, échec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:43 - ! [382] La connexion au serveur ? (local) ? a
> échoué (SubSystemStepHistoryLogger)
> i have to reboot server , restart sqlagent don't resolve this pb
> have you ever see this pb ?
> excuse my language i'm french
>
Labels:
2006-02-24,
c9chec,
database,
dupilote,
erreur,
jobmanager,
microsoft,
mysql,
odbc,
oracle,
server,
sql,
sqlagent,
sqlallochandle,
unable
big problem on sqlagent
2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:20 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:43 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
i have to reboot server , restart sqlagent don't resolve this pb
have you ever see this pb '
excuse my language i'm frenchHave you checked your MDAC and SP levels?
I think I have seen that when the OS MDAC/Patches weren't synchronized with
the SS service packs. Quick search has too may hits to be useful, except
that it is some sort of buffer issue.
--
Joseph R.P. Maloney, CSP,CCP,CDP
"jytjyt" wrote:
> 2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
> 2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, Ã?chec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:20 - ! [382] La connexion au serveur « (local) » a
> échoué (SubSystemStepHistoryLogger)
> 2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, Ã?chec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:43 - ! [382] La connexion au serveur « (local) » a
> échoué (SubSystemStepHistoryLogger)
> i have to reboot server , restart sqlagent don't resolve this pb
> have you ever see this pb '
> excuse my language i'm french
>sql
2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:20 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, =C9chec SQLAllocHandle du
pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
2006-02-24 02:54:43 - ! [382] La connexion au serveur =AB (local) =BB a
=E9chou=E9 (SubSystemStepHistoryLogger)
i have to reboot server , restart sqlagent don't resolve this pb
have you ever see this pb '
excuse my language i'm frenchHave you checked your MDAC and SP levels?
I think I have seen that when the OS MDAC/Patches weren't synchronized with
the SS service packs. Quick search has too may hits to be useful, except
that it is some sort of buffer issue.
--
Joseph R.P. Maloney, CSP,CCP,CDP
"jytjyt" wrote:
> 2006-02-24 02:54:07 - ! [380] unable to start thread JobManager .....
> 2006-02-24 02:54:20 - ! [165] Erreur ODBC : 0, Ã?chec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:20 - ! [382] La connexion au serveur « (local) » a
> échoué (SubSystemStepHistoryLogger)
> 2006-02-24 02:54:43 - ! [165] Erreur ODBC : 0, Ã?chec SQLAllocHandle du
> pilote sur SQL_HANDLE_DBC [SQLSTATE IM005]
> 2006-02-24 02:54:43 - ! [382] La connexion au serveur « (local) » a
> échoué (SubSystemStepHistoryLogger)
> i have to reboot server , restart sqlagent don't resolve this pb
> have you ever see this pb '
> excuse my language i'm french
>sql
Labels:
2006-02-24,
c9chec,
database,
erreur,
jobmanager,
microsoft,
mysql,
odbc,
oracle,
pilote,
server,
sql,
sqlagent,
sqlallochandle,
unable
Subscribe to:
Posts (Atom)