Have you ever tried creating a data table in Excel?  When you define it,
you can use your RBase database as an ODBC source, then write your SQL
query as part of the table-definition process.

 

This way, there is no challenge of export/import or outputting your
report to a file.  It's a direct connection to your data/database and,
once defined, it's easy.  You can refresh the data automatically on
opening the XLS file or do it in an on-demand fashion.  I typically do
it on-demand and save each new update as a new file - CYA, you
understand - for historical needs.

 

I've used this approach at various times to pull data from RBase, SQL
Server, and, just this morning, from Oracle.  In RBase, I typically
define a view that contains just the data I want to "show up" in the
spreadsheet.  The Oracle-sourced one I did today I had to do as a LONG
SQL statement (it's a little bit complex, multi-table, SELECT...UNION
SELECT), but it worked fine, too.

 

I know I'm skimming this and thereby probably not giving you enough
information, but it might be an approach that would help you. 

 

My $0.02,

Steve in Memphis

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jan
Barley
Sent: Monday, November 03, 2008 1:06pm 13:06
To: RBASE-L Mailing List
Subject: [SPAM] [RBASE-L] - Re: Printing to Excel File
Importance: Low

 

Hmmm... I use Arial 10 as my default font.  All fields are left aligned.
I ended up using one field (Variable memo) to hold all the info I need.
I use a (char(10)) to seperate each line I need to create.  Do I also
need to LJS them?  Here's my list of variables:

 

  1  : TEXT   : D : vattn =
(ifgt((slen(attn)),1,(attn+(char(10))+addr1+(char(10))),(addr1+(char(10)
))))
  2  : TEXT   : D : vadd =
(.vattn+(ifexists(addr2,(addr2+(char(10))+csz),(csz))))
  3  : TEXT   : D : vbcsz = (ifgt((slen(bcsz)),1,((char(10))+bcsz),' '))
  4  : TEXT   : D : vbadd =
((ifgt((slen(baddr1)),1,((char(10))+baddr1),'
'))+(ifgt((slen(baddr2)),1,((char(10))+.vbcsz),.vbcsz)))
  5  : TEXT   : D : vem =
(ifgt((slen(email)),1,((char(10))+email),email))
  6  : TEXT   : D : vws =
(ifgt((slen(website)),1,((char(10))+website),website))
  7  : TEXT   : D : vphone =
(ifgt((slen(phone)),1,((char(10))+phone),phone))
  8  : TEXT   : D : vfax = (ifgt((slen(fax)),1,((char(10))+fax),fax))
  9  : TEXT   : D : vaddress = (.vadd+(ifgt((slen(.vbadd)),1,.vbadd,'
'))+(ifgt((slen(.vphone)),1,.vphone,' '))+(ifgt((slen(.vfax)),1,.vfax,'
'))+(ifgt((slen(.vem)),1,.vem,' '))+(ifgt((slen(.vws)),1,.vws,' ')))

 

I had to check to see if the field was longer than 1 char because it
counts the space.  On the report, the only field I use is the vaddress.
I had to put the (char(10)) before the next field or I would get a
space, then the field.

 

I cannot simply export the data as I need to sort it by business
category and don't want the business category to show for each business.
Also, I don't know how to manipulate the Excel - if I click to Open
after Generate, it creates a new worksheet!  I have tried this in both
my Excel 2002 and Excel 2007 and get the same results!  Also am using
the latest build for 7.6.

 

This is so strange!  The Excel drops different fields each time :

 

the first record dropped the contact name and email

the second record dropped the phone number

the third record dropped the address

the fourth record dropped the FAX

the fifth record dropped the street address

the sixth record dropped the city

 

Jan

 

Reply via email to