Re: How to set the file name of a QR Report to disk file.

2017-12-29 Thread John Baughman via 4D_Tech
$path has the file name and $aSelectedPath{1} contains the full path selected, 
but what I am referring to is using an access path number in the directory 
parameter so that when the user does something that opens a Select document or 
Select folder dialogue again, the last directory they selected is remembered 
and the dialogue opens to the remembered directory.

Select document is designed for selecting documents, but the developers had the 
foresight to optionally use it like the Select folder function with a file 
name. The only way to provide a suggested file name is to include it in the 
directory path in the directory path, which is where you would put an access 
path number if you wanted a selected path remembered for future use. So you 
cannot do both. If the suggested file name were a separate parameter, then you 
could do both.

John





> On Dec 29, 2017, at 12:27 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 
>> I wish that the command isolated the file name in another parameter so that 
>> I could use a memorized access path number in the directory parameter. Guess 
>> I can’t have it all.
>> 
>> $path:=Select document(System folder(Documents folder)+$path;"";"Report 
>> name:";File name entry;$aSelectedPath)
> 
> $path, the return value, contains the file name if that's what you're looking 
> for.
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to set the file name of a QR Report to disk file.

2017-12-29 Thread Keisuke Miyako via 4D_Tech

>  I wish that the command isolated the file name in another parameter so that 
> I could use a memorized access path number in the directory parameter. Guess 
> I can’t have it all.
>
> $path:=Select document(System folder(Documents folder)+$path;"";"Report 
> name:";File name entry;$aSelectedPath)

$path, the return value, contains the file name if that's what you're looking 
for.



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to set the file name of a QR Report to disk file.

2017-12-29 Thread John Baughman via 4D_Tech
> On Dec 28, 2017, at 1:16 PM, Guy Algot via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I use an offscreen area. For example ;

Thanks Guy! I tried to use on offscreen area, but until I saw your example 
could not get it to do what I wanted. Using your example with a couple of 
modifications I got it working almost perfectly now, working code below.

The only issue I have now, which is not a big deal, is with the function 
"Select document" which allows me to suggest a file name in the dialogue. I 
wish that the command isolated the file name in another parameter so that I 
could use a memorized access path number in the directory parameter. Guess I 
can’t have it all.

In any event, Thanks again Guy.

John


C_BLOB($doc)
C_TEXT($path; $reportPath)
C_LONGINT($myQR)
$path:=“MySuggestedFileName"
$path:=Select document(System folder(Documents folder)+$path;"";"Report 
name:";File name entry;$aSelectedPath)

If (ok=1)
 $path:=$aSelectedPath{1}+".txt"
 $reportPath:=Get 4D folder(Database folder)+"Resources"+Folder 
separator+"TimeSheetEmployeeExport.4qr"
 $myQR:=QR New offscreen area
 DOCUMENT TO BLOB($reportPath;$doc)
 QR BLOB TO REPORT($myQR;$doc)
 QR SET DESTINATION($myQR;qr text file;$path)
 QR RUN($myQR)
 QR DELETE OFFSCREEN AREA($myQR)
End if 




John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to set the file name of a QR Report to disk file.

2017-12-29 Thread bernard--- via 4D_Tech
I use QR reports with a custom form and an adaptation of tech notes 05-13 to 15 
QR Editor Source.
This allows me to have a save button using QR REPORT TO BLOB : I can give the 
path...

HTH

Bernard Escaich


> Le 28 déc. 2017 à 01:43, John Baughman via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> I am executing a report with…
> 
> QR REPORT([Timesheets];Get 4D folder(Database folder)+"Resources"+Folder 
> separator+"TimeSheetEmployeeExport.4qr”)
> 
> This works fine, but I want to dictate or at least offer a preset file name 
> to the end user in the save dialogue. Tried various approaches without any 
> success. 
> 
> Thanks for any help.
> 
> John
> 
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com
> 
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to set the file name of a QR Report to disk file.

2017-12-28 Thread Guy Algot via 4D_Tech
I use an offscreen area. For example ;

myQR:=QR New offscreen area
QR SET REPORT TABLE(myQR;Table(->[InvoiceItems])) 

QR INSERT COLUMN(myQR;1;->[InvoiceItems]InvoiceDate)
QR INSERT COLUMN(myQR;2;->[InvoiceItems]InvoiceNo)
QR INSERT COLUMN(myQR;3;->[InvoiceItems]Customer)
QR INSERT COLUMN(myQR;4;->[InvoiceItems]PartNo)

QR SET DESTINATION(myQR;qr text file;$path_vT)
QR RUN(myQR)
QR DELETE OFFSCREEN AREA(myQR)

What you were able to do in versions prior to v16 was generate this code by 
simply designing the report in the QR editor and using the wizard.  I cannot 
find the wizard in the new QR editor.


> On Dec 28, 2017, at 8:30 AM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> John:
> 
> I wasn't sure of how QR REPORT worked. I checked the docs and the path at
> $2 is the path to the report so my thinking was there there was a save file
> dialog needed.
> 
> The other thing that came to mind was is you could handle this like you
> would with 4D Write - create an offscreen area, run the report in the
> offscreen area, and then handle the report as desired. That's what the last
> example (#5) in the docs does - it creates the report in a BLOB which you
> can handle with 4D document commands. Is that something that might take
> care of it?
> 
> --
> Douglas von Roeder
> 949-336-2902
> 
> On Wed, Dec 27, 2017 at 10:54 PM, John Baughman via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Thanks Doug. What I need is specifically related to using the command QR
>> REPORT with a prebuilt .4qr file which exports a selection of records to a
>> text file. I am not at all concerned with where the file is being saved,
>> but what the file name will be.
>> 
>> I do not see any way to force QR REPORT to bypass the Save As dialogue, or
>> to set the suggested file name to anything other than My Report.txt.
>> 
>> Correct me if I am wrong, but I don’t think what you suggested will work
>> with QR REPORT to set the file name or to otherwise use the .4qr file such
>> that I can specify the file name.
>> 
>> John
>>> 
>>> On Wed, Dec 27, 2017 at 4:43 PM, John Baughman via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
 I am executing a report with…
 
 QR REPORT([Timesheets];Get 4D folder(Database folder)+"Resources"+Folder
 separator+"TimeSheetEmployeeExport.4qr”)
 
 This works fine, but I want to dictate or at least offer a preset file
 name to the end user in the save dialogue. Tried various approaches
>> without
 any success.
 
 Thanks for any help.
 
 John
 


Later,
Guy

--
Guy Algot, Solutions Specialist
Edmonton, Alberta
(780) 974-8538

hardware, installation, training, support, programming, internet
specializing in 4th Dimension
=-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Microsoft is a cross between the Borg and the Ferengi. Unfortunately,
they use Borg to do their marketing and Ferengi to do their programming."
-- Simon Slavin



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to set the file name of a QR Report to disk file.

2017-12-28 Thread Douglas von Roeder via 4D_Tech
John:

I wasn't sure of how QR REPORT worked. I checked the docs and the path at
$2 is the path to the report so my thinking was there there was a save file
dialog needed.

The other thing that came to mind was is you could handle this like you
would with 4D Write - create an offscreen area, run the report in the
offscreen area, and then handle the report as desired. That's what the last
example (#5) in the docs does - it creates the report in a BLOB which you
can handle with 4D document commands. Is that something that might take
care of it?

--
Douglas von Roeder
949-336-2902

On Wed, Dec 27, 2017 at 10:54 PM, John Baughman via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks Doug. What I need is specifically related to using the command QR
> REPORT with a prebuilt .4qr file which exports a selection of records to a
> text file. I am not at all concerned with where the file is being saved,
> but what the file name will be.
>
> I do not see any way to force QR REPORT to bypass the Save As dialogue, or
> to set the suggested file name to anything other than My Report.txt.
>
> Correct me if I am wrong, but I don’t think what you suggested will work
> with QR REPORT to set the file name or to otherwise use the .4qr file such
> that I can specify the file name.
>
> John
>
> > On Dec 27, 2017, at 3:38 PM, Douglas von Roeder via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > John:
> >
> > If it's a beefed up save file dialog, ABM Mac Extras Plugin might be of
> > some help on OS X. I'd go with Win32API on Windows.
> >
> > ABM 1.5.2 is in a system that's running in 12.6. I traded email with
> > Matthias in 6/15 about using it in a newer version and he indicated that
> it
> > works in 13. I've used it in preliminary testing in 14.6 and it works OK.
> >
> > [time passes]
> >
> > Here's something from the wayback machine:
> >
> > "Am/On Fri, 23 Nov 2007 08:57:11 -0700 schrieb/wrote Ed Glassgow:
> >
> >> I am trying to do something that seems that should be trivial but it
> >> doesn't seem to be possible.  I am trying to set a default path for
> >> saving a document that I am going prompt the user with something like
> >> "$theDoc:=Create document("";"txt").  I would like the "Save As" dialog
> >> to open showing the contents of a certain folder.
> >
> > you can use our ABM_MacExtras Plugin for the Mac and Win32API for
> Windows.
> > Let me know, if you're interested and I send you the last UB build.
> > We will soon post it on our website.
> >
> > All the best
> >
> > Matthias
> >
> > 
> > Admilon Consulting GmbH 
> > Am Wiesengrund 9a, 90584 Allersberg
> > Geschaeftsfuehrer: Peter Frank, Matthias Schmidt
> > Amtsgericht Nuernberg: HRB 21750
> > Tel.: 09872-31 43 30
> > --"
> >
> >
> >
> > --
> > Douglas von Roeder
> > 949-336-2902 <(949)%20336-2902>
> >
> > On Wed, Dec 27, 2017 at 4:43 PM, John Baughman via 4D_Tech <
> > 4d_tech@lists.4d.com> wrote:
> >
> >> I am executing a report with…
> >>
> >> QR REPORT([Timesheets];Get 4D folder(Database folder)+"Resources"+Folder
> >> separator+"TimeSheetEmployeeExport.4qr”)
> >>
> >> This works fine, but I want to dictate or at least offer a preset file
> >> name to the end user in the save dialogue. Tried various approaches
> without
> >> any success.
> >>
> >> Thanks for any help.
> >>
> >> John
> >>
> >>
> >> John Baughman
> >> Kailua, Hawaii
> >> (808) 262-0328
> >> john...@hawaii.rr.com
> >>
> >>
> >>
> >>
> >>
> >> **
> >> 4D Internet Users Group (4D iNUG)
> >> FAQ:  http://lists.4d.com/faqnug.html
> >> Archive:  http://lists.4d.com/archives.html
> >> Options: http://lists.4d.com/mailman/options/4d_tech
> >> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >> **
> > **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
>
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com
>
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: 

Re: How to set the file name of a QR Report to disk file.

2017-12-27 Thread John Baughman via 4D_Tech
Thanks Doug. What I need is specifically related to using the command QR REPORT 
with a prebuilt .4qr file which exports a selection of records to a text file. 
I am not at all concerned with where the file is being saved, but what the file 
name will be. 

I do not see any way to force QR REPORT to bypass the Save As dialogue, or to 
set the suggested file name to anything other than My Report.txt.

Correct me if I am wrong, but I don’t think what you suggested will work with 
QR REPORT to set the file name or to otherwise use the .4qr file such that I 
can specify the file name.

John

> On Dec 27, 2017, at 3:38 PM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> John:
> 
> If it's a beefed up save file dialog, ABM Mac Extras Plugin might be of
> some help on OS X. I'd go with Win32API on Windows.
> 
> ABM 1.5.2 is in a system that's running in 12.6. I traded email with
> Matthias in 6/15 about using it in a newer version and he indicated that it
> works in 13. I've used it in preliminary testing in 14.6 and it works OK.
> 
> [time passes]
> 
> Here's something from the wayback machine:
> 
> "Am/On Fri, 23 Nov 2007 08:57:11 -0700 schrieb/wrote Ed Glassgow:
> 
>> I am trying to do something that seems that should be trivial but it
>> doesn't seem to be possible.  I am trying to set a default path for
>> saving a document that I am going prompt the user with something like
>> "$theDoc:=Create document("";"txt").  I would like the "Save As" dialog
>> to open showing the contents of a certain folder.
> 
> you can use our ABM_MacExtras Plugin for the Mac and Win32API for Windows.
> Let me know, if you're interested and I send you the last UB build.
> We will soon post it on our website.
> 
> All the best
> 
> Matthias
> 
> 
> Admilon Consulting GmbH 
> Am Wiesengrund 9a, 90584 Allersberg
> Geschaeftsfuehrer: Peter Frank, Matthias Schmidt
> Amtsgericht Nuernberg: HRB 21750
> Tel.: 09872-31 43 30
> --"
> 
> 
> 
> --
> Douglas von Roeder
> 949-336-2902 <(949)%20336-2902>
> 
> On Wed, Dec 27, 2017 at 4:43 PM, John Baughman via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> I am executing a report with…
>> 
>> QR REPORT([Timesheets];Get 4D folder(Database folder)+"Resources"+Folder
>> separator+"TimeSheetEmployeeExport.4qr”)
>> 
>> This works fine, but I want to dictate or at least offer a preset file
>> name to the end user in the save dialogue. Tried various approaches without
>> any success.
>> 
>> Thanks for any help.
>> 
>> John
>> 
>> 
>> John Baughman
>> Kailua, Hawaii
>> (808) 262-0328
>> john...@hawaii.rr.com
>> 
>> 
>> 
>> 
>> 
>> **
>> 4D Internet Users Group (4D iNUG)
>> FAQ:  http://lists.4d.com/faqnug.html
>> Archive:  http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com





**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: How to set the file name of a QR Report to disk file.

2017-12-27 Thread Douglas von Roeder via 4D_Tech
John:

If it's a beefed up save file dialog, ABM Mac Extras Plugin might be of
some help on OS X. I'd go with Win32API on Windows.

ABM 1.5.2 is in a system that's running in 12.6. I traded email with
Matthias in 6/15 about using it in a newer version and he indicated that it
works in 13. I've used it in preliminary testing in 14.6 and it works OK.

[time passes]

Here's something from the wayback machine:

"Am/On Fri, 23 Nov 2007 08:57:11 -0700 schrieb/wrote Ed Glassgow:

>I am trying to do something that seems that should be trivial but it
>doesn't seem to be possible.  I am trying to set a default path for
>saving a document that I am going prompt the user with something like
>"$theDoc:=Create document("";"txt").  I would like the "Save As" dialog
>to open showing the contents of a certain folder.

you can use our ABM_MacExtras Plugin for the Mac and Win32API for Windows.
Let me know, if you're interested and I send you the last UB build.
We will soon post it on our website.

All the best

Matthias


Admilon Consulting GmbH 
Am Wiesengrund 9a, 90584 Allersberg
Geschaeftsfuehrer: Peter Frank, Matthias Schmidt
Amtsgericht Nuernberg: HRB 21750
Tel.: 09872-31 43 30
--"



--
Douglas von Roeder
949-336-2902 <(949)%20336-2902>

On Wed, Dec 27, 2017 at 4:43 PM, John Baughman via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I am executing a report with…
>
> QR REPORT([Timesheets];Get 4D folder(Database folder)+"Resources"+Folder
> separator+"TimeSheetEmployeeExport.4qr”)
>
> This works fine, but I want to dictate or at least offer a preset file
> name to the end user in the save dialogue. Tried various approaches without
> any success.
>
> Thanks for any help.
>
> John
>
>
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com
>
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**