Date   

Re: Printing Word (docx) document and creating pdf files from them

Wes Hein
 

When you use the Word Application Object, do you set the Instantiation to Automatic?

Wes


Re: XPA 4.6 New Transaction Warning WP0266

Wes Hein
 

You can set that error message to 'Ignore' in the [Options][Checker Messages] if you don't want it reported all the time.

Wes


XPI local directory listing as XML

Mark Bertelsman <mark.bertelsman@...>
 

I'm trying to get an XML of a local directory structure from my flow. The FTP component allows it via "Directory Listing" on a remote server but I can find a way to get the same thing on a local directory. The File Management component will read a directory but will only provide a plain text listing and that doesn't work for what I need.

Any suggestions?


Re: EPPlus - CodePage

Pavel Mencl
 

I export to a .csv file and all's good there, when I open it with Excel, it's ok,same with Notepad,it's only with EPPlus that the text 'gets mangled'.
My DotNet knowledge is poor though,I thought this would do the job but it doesn't.
DNSet(DN_ExcelTextFormat.Encoding,'windows-1250')
DN_ExcelTextFormat is a Dotnet Variable, Object type = OfficeOpenXml.ExcelTextFormat.
What Am I missing now?
Thanks a lot for your advice,appreciate it greatly.
Pavel


Re: EPPlus - CodePage

Andreas Sedlmeier
 

Hi Pavel,

Here's an example only that it specifies UTF-8 for the encoding of the text file (.csv) which gets imported:
https://riptutorial.com/epplus/example/26605/import-data-from-csv-file

Instead of first line below you will have to use the second
.
// format.Encoding = new UTF8Encoding(); // use UTF-8 when decoding text file to internal representation (UTF-16 BE)
format.Encoding = new Encoding("windows-1250"); 
// assume textfile is Windows ANSI 1250 (eastern europe)
You can also convert the file to what you need ... before you open it with Excel.
I am wondering why your codepage (Windows-1250) does not work for you.
Should be your default Windows system ANSI codepage.


Re: Routing in MagicWeb

Tomáš Gazda
 

Hi Rob,
Your assumption is right. It only use navigation to another program. But it is now true that the link to page from where it came is unknown. I think there is a possibility to use Anglular location service (https://angular.io/api/common/Location)  which has function to navigate back. There is one problem with this navigation. Based on your example: when your return from ProjectDetail to Projectlist program using navigation, Projectlist will need to call a database again to get all the data.

Tomas


Re: XPA 4.6 New Transaction Warning WP0266

Mike Bannon
 

Hi Steve

 

The behaviour hasn’t changed, you always needed to have a table defined to open a transaction – otherwise how would it know what database to open the transaction in? The only change here is that now it alerts you to it.

 

Regards

Mike Bannon

DataFormation Ltd., UK

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Steven Burrows
Sent: 25 November 2019 09:48
To: magicu-l@groups.io
Subject: [magicu-l] XPA 4.6 New Transaction Warning WP0266

 

Looking at a 2.5 to 4.6 conversion and we are a little worried about a new warning in XPA 4.6

 

WP0266: The task is defined to open a transation but the transation will not be opened since no data source was defined.

 

We have a LOT of them, and in the vast majority of cases, its fine, the transaction is utterly unnecessary. However, in a many places, we have a task with no data that is specifically there so that we can run several sub tasks within the same transaction.

If this new behaviour that we will have to code around by defining tables from the correct databases, or is has this always been the case (our code not as safe as we thought!), and its just the warning that is new ?

It’s a bit of a major change that I cant find described in the Upgrade notes

 

Steven Burrows

 

 


Re: Keeping a chain of programs in the same subform

Ramon de Wit
 

Hey Chris,

 

Indeed I was also thinking about a dispatcher task which launches all programs needed in the subform.

 

However you do loose parameter passing when in a chain of programs which call each other. Kind of annoying.

 

Would be so much nicer if the whole chain would be kept automatically in the same sub form.

 

I’m wondering if this works in Desktop RIA, or even plain Client Server. I have the feeling it does, but start to doubt now J

 

 

Ramon

 

Van: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] Namens Chris de Bijl
Verzonden: zaterdag 23 november 2019 10:43
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Keeping a chain of programs in the same subform

 

Raemon,

Maybe thuis works:

Define an event in the main program

Handle this event in the program where the subforum is defined.

In this event, you call your program and specify which detination subform should be used.

Chris.



On Thu, Nov 21, 2019 at 12:37 PM +0100, "Ramon de Wit" <rwit@...> wrote:

Hello,

 

 

XPA 3.3, RIA, iOS

 

 

On a mobile iOS app I call a program with as destination the name of a subform. This works fine. However this new program calls another program which I want to keep in the same original subform.

However, the form of this third program breaks out of the subform and shows full screen.

 

In the call from program two, to program three, I have the same subform name in the destination field.

 

According to the help file, as I interpret it, it should search the runtime tree for the correct subform to display it’s form:

 

 

 

 

Any thoughts?

 

 

Greets,

Ramon


Re: XPA 4.6 New Transaction Warning WP0266

Gábor Bor
 

Hy Steven!

 

I think that if you want open transaction in an upper task you have to Deaclare a table in Write mode to the magic open transaction.

 

Best Regards,

Gábor

 

From: Steven Burrows
Sent: 2019. november 25., hétfő 10:48
To: magicu-l@groups.io
Subject: [magicu-l] XPA 4.6 New Transaction Warning WP0266

 

Looking at a 2.5 to 4.6 conversion and we are a little worried about a new warning in XPA 4.6

 

WP0266: The task is defined to open a transation but the transation will not be opened since no data source was defined.

 

We have a LOT of them, and in the vast majority of cases, its fine, the transaction is utterly unnecessary. However, in a many places, we have a task with no data that is specifically there so that we can run several sub tasks within the same transaction.

If this new behaviour that we will have to code around by defining tables from the correct databases, or is has this always been the case (our code not as safe as we thought!), and its just the warning that is new ?

It’s a bit of a major change that I cant find described in the Upgrade notes

 

Steven Burrows

 

 

 


XPA 4.6 New Transaction Warning WP0266

Steven Burrows
 

Looking at a 2.5 to 4.6 conversion and we are a little worried about a new warning in XPA 4.6

 

WP0266: The task is defined to open a transation but the transation will not be opened since no data source was defined.

 

We have a LOT of them, and in the vast majority of cases, its fine, the transaction is utterly unnecessary. However, in a many places, we have a task with no data that is specifically there so that we can run several sub tasks within the same transaction.

If this new behaviour that we will have to code around by defining tables from the correct databases, or is has this always been the case (our code not as safe as we thought!), and its just the warning that is new ?

It’s a bit of a major change that I cant find described in the Upgrade notes

 

Steven Burrows

 

 


EPPlus - CodePage

Pavel Mencl
 

Hi,
any idea how to set a CodePage with EPPlus? I use LoadFromText to import data into  a worksheet and my data are Ascii CodePage 1250.
Pavel


Re: Advanced FileDlg() Techniques

Mr Magic
 

in case somebody need it for v9.4 

FILEDLG ('Word Document','*.doc'&CHR (0)&'Excel Spreadsheet'&CHR (0)&'*.xls'&CHR (0)&'Powerpoint Slideshow'&CHR (0)&'*.pp?'&CHR (0)&'Acrobat PDFs'&CHR (0)&'*.pdf')



ariel 
magic line 


Re: Discrete Field Ranging

Mike Bannon
 

Is your link query linking to a single unique record? If so, use a link inner join instead. Now you can treat the joined table as if it were part of the main table. Using an inner join, to range on blank or specific value, I’d use the task range, on the SQL Where tab, in the UniPaas SQL expression, where you can put ‘fkClientID=’’OR fkClientID = p_ClientID’.

 

As for the range on the list box, I find it easiest to create a SQL View and use this.

 

HTH

Mike Bannon

DataFormation Ltd., UK

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of jk@...
Sent: 23 November 2019 12:21
To: main@magicu-l.groups.io
Subject: [magicu-l] Discrete Field Ranging

 

Unipass 1.9g/MSSQL 2014

Is it possible to do a discrete field value in Link Queries or List Boxs?  It looks like you can only range on a From and To value limiting the results to a range of values from A to B.

But I need to be able to range on either blank or specific values instead of a range.  For example, instead of ranging from 'AAA' to 'ZZZ', I need to return rows where they are either blank ('') or 'MMM. I tried ranging on an expression like this:

IF (fkClientID<>'',p_ClientID,'')

But it only returns rows where fkClientID is blank.

Is this possible?

Thank you


Re: Routing in MagicWeb

Rob Westland
 

Hi Tom,

Your assumption is correct. I'm talking about the webclient.


Rob

On 22-11-2019 15:18, Tom Worthen wrote:

Rob,

 

It might be beneficial to know if you are referring to the new web client or html merge. I would think both would be considered web applications.

 

My guess is you are referring to the web client because what you describe is definitely not an option with html merge.

 

I don’t have any experience with the web client but thought I would commit only to try and get clarification.

 

Tom

 

 

From: main@magicu-l.groups.io [mailto:main@magicu-l.groups.io] On Behalf Of Rob Westland
Sent: Friday, November 22, 2019 4:26 AM
To: magicu-l@groups.io
Subject: [magicu-l] Routing in MagicWeb

 

We are currently developing a complete new Web application and I have a question about routing and how programs interact with each other inside Magic.

In Magic I can normally call programs and they are stacked on top of each other and when you exit you go back to your previous program. Is this also possible in Web?

For example:

I have a program which shows a number of projects and when I click on 1 project it goes to another screen which shows all the details about that project. And when I press exit I want to go back to the Projectlist.

So in the Projectlist I raised an event which is handled in maintask of that program and there I did a call subtask to ProjectDetails. When I exit ProjectDetails I want to go back to the Projectlist but an exit event exits the entire program.

So is my assumption correct that routing does not stack programs on top of each other but just simple navigates to the next program and forget where it came from?

What is the way to go in this?

Rob


Re: Discrete Field Ranging

Keith Canniff
 

Link queries you can do any descrete values you want.

1. Between link and end link add a virtual field of type logical
2. On the init for the new virtual field put any condition you want to use to find a record
3. If you're  looking for a record. Put true or false on the locate min/max (depending on if the init expression is to include or exclude values). If you want to range records returned to the task, then put true/false on the range min/max

Keith


From: main@magicu-l.groups.io <main@magicu-l.groups.io> on behalf of Todd Baremore <tbaremor@...>
Sent: Saturday, November 23, 2019 10:21:14 AM
To: main@magicu-l.groups.io <main@magicu-l.groups.io>
Subject: Re: [magicu-l] Discrete Field Ranging
 
JK

For a blank choice use  \
Todd
On 11/23/2019 7:21 AM, jk@... wrote:
Unipass 1.9g/MSSQL 2014

Is it possible to do a discrete field value in Link Queries or List Boxs?  It looks like you can only range on a From and To value limiting the results to a range of values from A to B.

But I need to be able to range on either blank or specific values instead of a range.  For example, instead of ranging from 'AAA' to 'ZZZ', I need to return rows where they are either blank ('') or 'MMM. I tried ranging on an expression like this:

IF (fkClientID<>'',p_ClientID,'')

But it only returns rows where fkClientID is blank.

Is this possible?

Thank you


Re: Discrete Field Ranging

Todd Baremore
 

JK

For a blank choice use  \
Todd
On 11/23/2019 7:21 AM, jk@... wrote:

Unipass 1.9g/MSSQL 2014

Is it possible to do a discrete field value in Link Queries or List Boxs?  It looks like you can only range on a From and To value limiting the results to a range of values from A to B.

But I need to be able to range on either blank or specific values instead of a range.  For example, instead of ranging from 'AAA' to 'ZZZ', I need to return rows where they are either blank ('') or 'MMM. I tried ranging on an expression like this:

IF (fkClientID<>'',p_ClientID,'')

But it only returns rows where fkClientID is blank.

Is this possible?

Thank you


Discrete Field Ranging

jk@...
 

Unipass 1.9g/MSSQL 2014

Is it possible to do a discrete field value in Link Queries or List Boxs?  It looks like you can only range on a From and To value limiting the results to a range of values from A to B.

But I need to be able to range on either blank or specific values instead of a range.  For example, instead of ranging from 'AAA' to 'ZZZ', I need to return rows where they are either blank ('') or 'MMM. I tried ranging on an expression like this:

IF (fkClientID<>'',p_ClientID,'')

But it only returns rows where fkClientID is blank.

Is this possible?

Thank you


Printing Word (docx) document and creating pdf files from them

Polgár Ferenc
 

Hi All,

Our task is printing warranty card(s) with the invoices, or creating them as pdf attachment for e-invoices. (uniPaas 1.9p)
I wonder how would you do this?
I'm thinking of several solutions:
I tried the newest versions of OpenOffice and LibreOffice, as they can export the document in pdf format (and they are free), but they are not compatible with the docx files created by MS Word...
I tried the OfficeCom.ecf, but I couldn't even open a Word document.  I'm uncertain what to select for
Application Object  and Workbook Object...
call WORDCOM_DocumentOpenCreate
Word Application Application Object  
OLE
Word File Name File Name (Full Path)
Alpha
Read Only True, False Logical
Word Document Workbook Object OLE
Return Code Error Return Code Numeric
Open in Text Encoding Text encoding for text files  e.g. 
1252 – Western
1255 – Hebrew
65001 - UTF8
Numeric

Maybe I can call a vbscript to print a Word document to printer. Here is a probably solvable problem to print to the printer UP uses for output of the invoices - not the default printer.
For the pdf out I can print the same way to a pdf printer and then using the PDF Toolkit  I can merge the invoice and warranty cards to a single pdf file.

Anyone has a better idea or an already used solution?
TIA
Ferenc




Re: Keeping a chain of programs in the same subform

Chris de Bijl
 

Raemon,
Maybe thuis works:
Define an event in the main program
Handle this event in the program where the subforum is defined.
In this event, you call your program and specify which detination subform should be used.
Chris.




On Thu, Nov 21, 2019 at 12:37 PM +0100, "Ramon de Wit" <rwit@...> wrote:

Hello,

 

 

XPA 3.3, RIA, iOS

 

 

On a mobile iOS app I call a program with as destination the name of a subform. This works fine. However this new program calls another program which I want to keep in the same original subform.

However, the form of this third program breaks out of the subform and shows full screen.

 

In the call from program two, to program three, I have the same subform name in the destination field.

 

According to the help file, as I interpret it, it should search the runtime tree for the correct subform to display it’s form:

 

 

 

 

Any thoughts?

 

 

Greets,

Ramon


Re: XPA 4.6 studio license

Julie Murphy
 

Hi
V4.5 licences do not work with V4.6
You need to ask your local Magic office to get you a new one.
HTH
Julie
Magic UK
Julie Murphy
07795 395061
Julie_murphy@...

On 23 Nov 2019, at 08:55, Avgerinos <mento@...> wrote:

Hi magicians

Anyone knows whether the of XPA-4.5a studio license works with 4.6?

Thanks in advance
Avgerinos


4341 - 4360 of 195966