i want to generate a report from a temporary table generated on SQL, i have made de temp table, but when i try to change the default table of the report it just doesnt work.
i currently have made users tables to generate this report but i dont want to make report from those table i want to be able to generate does temp tables at runtime.
Here is the code:
Set conn = New ADODB.Connection
conn.Open "Provider=SQLOLEDB;Data Source=SERVIDOR4;" _
& "Initial Catalog=Aplicaciones;User ID=ClientUser;Password=USER"
sql = "CREATE TABLE #myTemporaryTable (Col1 CHAR)"
Set rs = conn.Execute(sql)
CrystalReport1.Database.Tables(1).Name = "#myTemporaryTable"
CrystalReport1.Database.Tables(1).SetLogOnInfo "SERVIDOR4", "Aplicaciones", "ClientUser", "USER"
Form2.CRViewer1.ReportSource = CrystalReport1
Form2.CRViewer1.ViewReport
Form2.Show vbModal
Any suggestions?
i currently have made users tables to generate this report but i dont want to make report from those table i want to be able to generate does temp tables at runtime.
Here is the code:
Set conn = New ADODB.Connection
conn.Open "Provider=SQLOLEDB;Data Source=SERVIDOR4;" _
& "Initial Catalog=Aplicaciones;User ID=ClientUser;Password=USER"
sql = "CREATE TABLE #myTemporaryTable (Col1 CHAR)"
Set rs = conn.Execute(sql)
CrystalReport1.Database.Tables(1).Name = "#myTemporaryTable"
CrystalReport1.Database.Tables(1).SetLogOnInfo "SERVIDOR4", "Aplicaciones", "ClientUser", "USER"
Form2.CRViewer1.ReportSource = CrystalReport1
Form2.CRViewer1.ViewReport
Form2.Show vbModal
Any suggestions?