index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: Generate Report File From Property :: (8)Post a New Message | Post a Reply
Jun 16 2004, 2:31 PM
 Generate Report File From PropertyPost a Reply
 Latitude7ds

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

from: somewhere


We are dynamically reading the SQL Server for Databases available then setting the connection properties to the user selected database. Works Great however,

We Now are Setting the property objWiz.ReportFile = DatabaseName & ".xml"
We need this so saved reports from one databse will not show up when using a different database. We can Not create a reports file ahead of time because we are dynamically reading available databases.
SO. Even though we set the objWizReportsFile = "Dynamic.xml" if there is not a filename of Dynamic.XML it creates a Filename of Reports.xml.

Is there a way to make it create the filename from the Property Value?


Jun 16 2004, 2:40 PM
 Re: Generate Report File From PropertyPost a Reply
 whichman

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

from: Laurel, MD

As of the next release version 2.3 (due probably tomorrow thursday June 17th) we will add the functionality to create a new reports file if:
1. The reports file is set i.e. objWiz.ReportsFile="C:\myfolder\somefile.xml"
or
objWiz.ReportsFile="somefile.xml" //implies reports folder

and
2. The reports file is missing.

Thanks for the suggestion.


-------------------------
Master of the Game
Jun 17 2004, 3:24 PM
 Re: Generate Report File From PropertyPost a Reply
 Latitude7ds

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

from: somewhere

It apears that When Creating a Report it is still looking for Reports.xml
It Creates the File defined in ReportFile Property but it will not save a report in that created file. Gives Error  "REPORTS FILE NOT FOUND" in wizard dialog.

ALSO, We never fixed the problme of some databases not listing all the tables without having to specify UseTables. It appears that User created Databases work, Pubs & Northwind do Not. Also Databases we create dynamically through Code seem to have the same problem.

When clicking on the Table I get "Invalid object name 'Categories'" for Northwind.

I manually went in and configured Security on the Databases same problme.

So the First solution of creating a dynamic Report File will not work if we still have to Set UseTables property.

Jun 18 2004, 5:40 AM
 Re: Generate Report File From PropertyPost a Reply
 ghost

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

from: Washington, DC

It apears that When Creating a Report it is still looking for Reports.xml
It Creates the File defined in ReportFile Property but it will not save a report in that created file. Gives Error  "REPORTS FILE NOT FOUND" in wizard dialog.


Make sure that your filename doesn't end in reports.xml

ALSO, We never fixed the problme of some databases not listing all the tables without having to specify UseTables. It appears that User created Databases work, Pubs & Northwind do Not. Also Databases we create dynamically through Code seem to have the same problem.

I think this has to do with the security rights of the user id and password you are using to connect to the SQL database

When clicking on the Table I get "Invalid object name 'Categories'" for Northwind.
Can you show me your connection string?


-------------------------
Ghost
Jun 21 2004, 6:56 AM
 Re: Generate Report File From PropertyPost a Reply
 Latitude7ds

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

from: somewhere

It creates the Report File correctly. We are just using the Default Directory.
objwiz.ReportsFile = Testing.xml
But when we try to create a Report it gives error
Reports file not found!
Make sure the file exists in the following location:
c:\inetpub\wwwroot\RepWiz\.xml

So it would seem the Directory or File is not being parsed correctly.





Jun 21 2004, 8:23 AM
 Re: Generate Report File From PropertyPost a Reply
 ghost

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

from: Washington, DC

Make sure your ASP variables have been set or are present. For example, if you use the Session object or the Request object, make sure that your parameter values are not empty
e.g.
<%
  Dim strReportsFile
  strReportsFile = Request.QueryString("db")
  
  If strReportsFile = "" Then
     Response.Write("Reports File Not Found")
     Response.End
  End  If
  
  objWiz.ReportsFile = strReportsFile
....
%>




-------------------------
Ghost
Jun 21 2004, 2:35 PM
 Re: Generate Report File From PropertyPost a Reply
 Latitude7ds

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

from: somewhere

I'm stating that IT DOES Create the report file if there isn't one. You fixed that in your latest version, So I am getting the Request Variable. BUT... Now it doesn't Find the file when building a Report from the Wizard.

I'll Email you my Code

This is on W2k or NT.

Jun 22 2004, 5:53 AM
 Re: Generate Report File From PropertyPost a Reply
 ghost

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

from: Washington, DC

We have just uploaded a newer version (build 2.0.185) which contains the bug fix and some other minor fixes.
You can download it from here

Note:
Always set your reportsFile before initializing the connection string.  

Also, I made some changes to the code you sent, I set the database name in a session variable. I think that is why the reportsFile variable was disappearing as follows:


<%
     'Initialize variables and objects
      Set objwiz      = Server.CreateObject("AspWebSolution.ReportWizard2")
      
      If Request("database") <> "" Then  
          Session("database") = Request("database")
      End  If
      
      If Session("database") = "" Then  
          'Session("database") = DatabaseName
          Response.Redirect "default.asp"
      End  If
      
     'Set up the connection string
     strConnectionString = "Provider=SQLOLEDB; Data Source= "& SQLServer & "; User Id= "& DatabaseUser & "; Password= "& DatabasePassword & "; Initial Catalog= "
     strConnectionString = strConnectionString &  Replace(Session("database"),"'","''" ) & ";"
      
     objwiz.ReportsFile = Session("database") & ".xml"
     objwiz.Init(strConnectionString)  
             
%>
  






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

search this forum: