index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: Error: Command text was not set for the command ob :: (2)Post a New Message | Post a Reply
Feb 26 2005, 5:11 AM
 Error: Command text was not set for the command obPost a Reply
 blocka

View this author's profile Send this author a private message

since: Feb 25, 2005
from: Ontario

Our application has a component that generates a list of "system reports" the user has rights too -- one of these would be the ASP Report Wizard.

The generated code to call Report Writer is:
<input type="radio" name="menu" value="reports/default.asp" onclick="document.reportchooser.action='reports/default.asp?reportID=30&Parent=16';document.reportchooser.submit();">

But when the user clicks on the radio button to call the report, they get a message:

Command text was not set for the command object.

When the click on the Report Writer generated Home link, the report loads okay.

Why am I getting the error message?


Feb 28 2005, 5:39 AM
 Re: Error: Command text was not set for the com...Post a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

I am not sure what component you are using but if it is the ASP Report Wizard, you have to make sure you initialize your connection string before adding any HTML tags to your .asp page as shown below.


<%
'decalre your object
  Dim objWiz  
    
'create an instance
  Set objWiz = Server.CreateObject("AspWebSolution.ReportWizard2")  
    
'set paramters (if required)
objWiz.LocaleFolder = "C:\reports\locale"
objWiz.ReportsFile = "C:\reports\inventory.xml"
    
'initialize your connection string
objWiz.Init(strConn)  
  
%>
<html>  
     <head>
          <title>Inventory Reports</title>
     </head>  
     <body>  
<%
     objWiz.DisplayReports
      Set objWiz =  Nothing  
%>
     </body>  
</html>



-------------------------
Ghost
Pages: (1)   [1]

search this forum: