Valetine Reports - How I use a ADK Database to run these reports

barrysum at bigpond.net.au barrysum at bigpond.net.au
Sat Jun 14 04:55:57 CDT 2008


'  Some of the documentation is out of date

'  the following code worked before slightly changing 
'     the names to protect the innocent.

  dim f as folderitem
  dim strDBPath as string
  
  f = getfolderItem("")
  strDBPath =f.absolutePath
  
  #if targetWin32 then
    strDBPath =strDBPath +"Databases\myDB.vdb"
  #else
    strDBPath =strDBPath +"Databases:myDB.vdb"
  #endif
  
  
  Try
    
    f=getFolderItem(strDBPath)
    
    if f = nil then
      
      dim res as Integer
      
      res = MsgBox ( "Error Finding myDB.vdb - Server Database: " + crlf +
strDBPath, 0 + 16, " myDB.vdb - Databaes Not Found!")
      quit
      
    end if
    
    myDB = new Database
    myDB.Open( f )
    
  Catch Err as VException
    
    MsgBox " Error: " + Str(myDB.ErrNumber) + " - " +  myDB.ErrString + crlf
+crlf + "Error Opening or Finding myDB.vdb - Server Database: " + crlf + "
" + strDBPath
    quit
    
  End
  
  
  dim AllMyReports as VReportContainer
  dim repName as String
  
  AllMyReports = new VReportContainer( GetFolderItem( "Reports/Reports.vsp"
) )
  
  // Now you can use methods of VReportContainer class to:
  //   * investigate how many reports are inside of this container.
  //   * get their names to display in e.g. menu
  //   * extract single reports creating VReport class instance.
  
  dim I as integer
  
  for i = 1 to AllMyReports.ReportCount
    
    repName = AllMyReports.ReportName( i )
    
    msgbox repName
    
  next
  
  
  dim cursPeople as VCursor
  
  cursPeople = myDB.SqlSelect("SELECT * from byTable")
  
  #if targetWin32 then
    strDBPath =strDBPath +"Reports\Reports.vsp"
  #else
    strDBPath =strDBPath +"Reports:Reports.vsp"
  #endif
  
  
  dim myReport as VReport
  myReport = AllMyReports.MakeNewReport( cursPeople, repName )
  
  f = getfolderItem("")
  strDBPath = "Reports\report_1.pdf"
  f=getFolderItem(strDBPath)
  
  myReport.PrintToPDF(0, f)
  
  
  
  Dim s As Shell
  s= New Shell
  #if TargetWin32
    s.execute strDBPath
  #elseif ( TargetMacOS or TargetLinux) and Not( TargetMacOSClassic)
    s.execute strDBPath
  #else
    MsgBox "This doesn't run on Mac OS Classic!"
  #endif
  
  If s.errorCode = 0 then
    ' MsgBox "Success code: " + Str(s.errorCode)
  else
    MsgBox "Error code: " + Str(s.errorCode)
  end if
  

 baz


-----Original Message-----
From: valentina-beta-bounces at lists.macserve.net
[mailto:valentina-beta-bounces at lists.macserve.net] On Behalf Of
barrysum at bigpond.net.au
Sent: Saturday, 14 June 2008 6:45 PM
To: 'Valentina Beta'
Subject: RE: Features of Reports - can I use a VDK Database to run
thesereports?

I can only save my report as a .vsp vreportcontainer

But can't work out how to extract a single report from the report container

-----Original Message-----
From: valentina-beta-bounces+barrysum=bigpond.net.au at lists.macserve.net
[mailto:valentina-beta-bounces+barrysum=bigpond.net.au at lists.macserve.net]
On Behalf Of Ruslan Zasukhin
Sent: Saturday, 14 June 2008 3:23 PM
To: valentina-beta at lists.macserve.net
Subject: Re: Features of Reports - can I use a VDK Database to run these
reports?

On 6/14/08 3:37 AM, "barry at noodlebox.com.au" <barry at noodlebox.com.au> wrote:

Hi Barry,

> I've downloaded and install vStudio v3.6B20 BETA.
> The Reports Project interface looks very promising.
> 
> I've created a new project with a query, data source, and a blank report.
> 
> When I open the report in the designer to add a field from the database,
> the fields area/section contains NO fields.

Usually we see this if SQL query is not valid.
We need yet show dialog about such error.
 
>
http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
> tation:vstudio_pro:manual:reports:overview&s=reports+overview
> 
> 
> Did I miss something or is this as far as b20 goes?

Have you see this tutorial ?

http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documen
tation:vstudio_pro:tutorials:reports:reports




-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


_______________________________________________
Valentina-beta mailing list
Valentina-beta at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-beta

_______________________________________________
Valentina-beta mailing list
Valentina-beta at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-beta



More information about the Valentina-beta mailing list