Report Builder / Save Output

Discussion forum about all things Report Builder (all versions).
kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Report Builder / Save Output

Post by kjellv » 10 Apr 2016, 12:37

hi

Is it possible to save or export an output from a report to word or a .txt that later on can be imported to word?

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Report Builder / Save Output

Post by Jeff Luther » 10 Apr 2016, 18:04

I believe the answer is no, not directly anyway. You could 'print' to a certain formatted driver, like PDF for example, and once the report is saved to disk read the file into something which supports PDF format. I do this quite often when I want to generate an invoice that I want to email to a customer.

(My Invoice report is a QRP from a TD appl. I use the "CutePDF Writer": http://www.cutepdf.com/Products/CutePDF/writer.asp )

It looks like it is possible to find a 'print to Word format' printer driver and print the report that way. Maybe for TXT format too?

In fact!, I just googled 'print to word format driver" and see a list of possible options which include several options to print a PDF document to Word format. Maybe 1 of those would work? Here's the list I get with the search: https://www.google.com/search?q=print+t ... mat+driver

Let us know if you find something useful.
Jeff Luther @ PC Design
Palm Springs, California

Christof
Germany
Posts: 191
Joined: 06 Mar 2017, 07:27
Location: Frankfurt, Germany

Re: Report Builder / Save Output

Post by Christof » 11 Apr 2016, 07:45

You could use SalReportPrintToFile(...) or SalReportPrintToFileEx(...) with output format RTF.This can be loaded with MS Word directly.

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: Report Builder / Save Output

Post by kjellv » 11 Apr 2016, 08:01

hi and thanks.

I will investigate and lett you know.

If it's possible I have another small problem with Report Writer.

2 identical reports one CQT and one QRP. The CQT prints out is perfect, but the QRP prints only the last page with the headings, you have an idea why.

The same happens when I try to print to .pdf, looking at the file only the last page is there.

I run win 10.

Anyhow, again thanks

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: Report Builder / Save Output

Post by kjellv » 16 Apr 2016, 07:30

thanks to both it work Perfect.

kjell

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: Report Builder / Save Output

Post by kjellv » 16 Apr 2016, 07:31

Christof wrote:You could use SalReportPrintToFile(...) or SalReportPrintToFileEx(...) with output format RTF.This can be loaded with MS Word directly.
thanks very much

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: Report Builder / Save Output

Post by kjellv » 16 Apr 2016, 07:32

Jeff @ PC Design wrote:I believe the answer is no, not directly anyway. You could 'print' to a certain formatted driver, like PDF for example, and once the report is saved to disk read the file into something which supports PDF format. I do this quite often when I want to generate an invoice that I want to email to a customer.

(My Invoice report is a QRP from a TD appl. I use the "CutePDF Writer": http://www.cutepdf.com/Products/CutePDF/writer.asp )

It looks like it is possible to find a 'print to Word format' printer driver and print the report that way. Maybe for TXT format too?

In fact!, I just googled 'print to word format driver" and see a list of possible options which include several options to print a PDF document to Word format. Maybe 1 of those would work? Here's the list I get with the search: https://www.google.com/search?q=print+t ... mat+driver

Let us know if you find something useful.
as mentionned, to .pdf and a converter

thanks

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Report Builder / Save Output

Post by Jeff Luther » 16 Apr 2016, 16:02

I don't see where you wrote about your other small RB problem:
2 identical reports one CQT and one QRP. The CQT prints out is perfect, but the QRP prints only the last page with the headings, you have an idea why.
CQT -- has the SELECT query inside the CQT file

QRP -- the SELECT query is external and in a TD application. First thing I'd look at is the query in your appl. If the last page only is being printed in the report, that might be because the SELECT in the appl. is not returning any row(s). One way to debug this is to set a breakpoint right where the SELECT is or has been built in the appl, copy that (not including the INTO clause) and then paste it in SQLTalk and try to run it.

If the SELECT in the appl. is complex and has many concats., like 'SELECT ' || sTableColumns || ' FROM ' || sTables || ' INTO ' || sIntoVariables || ' WHERE ' || s Where... etc.
and that is in a SqlPrepare, for example, it's often easier to:

Code: Select all

Set sQuery =  'SELECT ' || sTableColumns || ' FROM ' || sTables || ' INTO ' || sIntoVariables || ' WHERE ' || s Where... etc.
then set a breakpoint after Set sQuery and use the Expressions window to see what sQuery is assigned. Copy/paste that (again, with no INTO clause) into SQLTalk and run it. the problem may be obvious when you see what sQuery is, especially if look at the WHERE clause variable values and see they are not assigned, for example.
Jeff Luther @ PC Design
Palm Springs, California

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests