This is really weird. I look at the sameple code from the crystal site for creating a blank rpt and add a connect using AddADOCommand.
Basically My client is rather ambitious. He wants to have ASP to create blank report, connect to SQL database, grab whatever the recordset desire, insert it into the report.
so far I was able to create, insert text object. But then when I tried to add a table or connection, it gives me all kinds of error.
Since my client doesn't want to pay the CR8.5 licensing fee for the web report from seagate. I'm using the craxdrt.dll(RDC) along with other dlls to grab data, process report and export to pdf.
Here is the code
Set test_object = CreateObject("Crystalruntime.Application"
Set testreport = test_object.NewReport()
' setup report
testreport.EnableParameterPrompting = false
testreport.ReportTitle ="TestReportTitle"
testreport.PerformGroupingOnServer = true
'Response.Write tmpstr
set areacollection = testreport.Areas
set areaobj1 = areacollection.Item(1)
set sectioncollection1 = areaobj1.Sections
set sectionobj1 = sectioncollection1.Item(1)
set newfieldobj1 = sectionobj1.AddTextObject("Here is the report header",3000,0,false)
set reportdatabaseobj = testreport.database
Set ADOcommandObj = Server.CreateObject("ADODB.Command"
ADOcommandObj.ActiveConnection = VS_Cur_Mod_Connection
ADOcommandObj.CommandText = "SELECT * FROM VS_codes"
reportdatabaseobj.AddADOCommand VS_Cur_Mod_Connection, ADOcommandObj
'=======================
The VS_Cur_Mod_Connection is the ADODB connection that I've been using at the top, workin fine. It's giving me VSscript: Type mismatch error.
Now interestingly if I put the actual connection string instead of the VS_Cur_Mod_Connection object, it gives me a crystal ActiveX error: Error from Database dll. meaning it was trying to connect to the database. BUT THE PHREAKIN PARAMETERS CLEARLY REQUIRE OBJECTS. So. I'm totally stuck here.
I tried to just insert a recordset.
First grab the tabel collection from the database object.
Then do an Add
but it gives me type mismatch error, and the help files doesn't help at all.
I dunno know what to do now. I'm stuck with a blank report with five text objects.
ANY HELP FROM SOMEONE WITH GREAT CR KNOWLEDGE IS APPRECIATED
Basically My client is rather ambitious. He wants to have ASP to create blank report, connect to SQL database, grab whatever the recordset desire, insert it into the report.
so far I was able to create, insert text object. But then when I tried to add a table or connection, it gives me all kinds of error.
Since my client doesn't want to pay the CR8.5 licensing fee for the web report from seagate. I'm using the craxdrt.dll(RDC) along with other dlls to grab data, process report and export to pdf.
Here is the code
Set test_object = CreateObject("Crystalruntime.Application"
Set testreport = test_object.NewReport()
' setup report
testreport.EnableParameterPrompting = false
testreport.ReportTitle ="TestReportTitle"
testreport.PerformGroupingOnServer = true
'Response.Write tmpstr
set areacollection = testreport.Areas
set areaobj1 = areacollection.Item(1)
set sectioncollection1 = areaobj1.Sections
set sectionobj1 = sectioncollection1.Item(1)
set newfieldobj1 = sectionobj1.AddTextObject("Here is the report header",3000,0,false)
set reportdatabaseobj = testreport.database
Set ADOcommandObj = Server.CreateObject("ADODB.Command"
ADOcommandObj.ActiveConnection = VS_Cur_Mod_Connection
ADOcommandObj.CommandText = "SELECT * FROM VS_codes"
reportdatabaseobj.AddADOCommand VS_Cur_Mod_Connection, ADOcommandObj
'=======================
The VS_Cur_Mod_Connection is the ADODB connection that I've been using at the top, workin fine. It's giving me VSscript: Type mismatch error.
Now interestingly if I put the actual connection string instead of the VS_Cur_Mod_Connection object, it gives me a crystal ActiveX error: Error from Database dll. meaning it was trying to connect to the database. BUT THE PHREAKIN PARAMETERS CLEARLY REQUIRE OBJECTS. So. I'm totally stuck here.
I tried to just insert a recordset.
First grab the tabel collection from the database object.
Then do an Add
but it gives me type mismatch error, and the help files doesn't help at all.
I dunno know what to do now. I'm stuck with a blank report with five text objects.
ANY HELP FROM SOMEONE WITH GREAT CR KNOWLEDGE IS APPRECIATED