Welcome! Log In Create A New Profile

Advanced

Re: Report - how to open it as child window?

Posted by Zeljko Bobic.pcs.crosspost 
Zeljko Bobic.pcs.crosspost
Re: Report - how to open it as child window?
August 14, 2008 10:56AM
Is this question so hard that noone knows the answer???

Message forwarded from pcsoft.us.windev
Javier.pcs.crosspost
Re: Report - how to open it as child window?
September 18, 2008 09:39AM
Have you seen the OpenChild function?

Message forwarded from pcsoft.us.windev
Zeljko Bobic.pcs.crosspost
Re: Report - how to open it as child window?
September 19, 2008 01:26PM
I tried to play with report like this:
1. I'm using this code:
-iPreview(100)
-iPrintReport(NameOfReport)
THIS WORKS FINE - BUT THE PREVIEW WINDOW IS ON TOP AND YOU CANNOT SEE ANYTHING ELSE UNTIL YOU CLOSE THE PREVIEW WINDOW.
2. I tried:
- openchild(NameOfReport)
this doesn't work because report is not a window to open
3. Afterwards I tried to define the preview window in 'Project desciption'->Style->Print preview->Custom.....and I defined that preview window is a child window.
But, I don't know how to open it with preview data, because when I use this:
iPreview(100)
iPrintReport(CustomizedPreview)
I got the same like from the beginning!
if I use: openchild(CustomizedPreview) then I don't see data at all
So please, if anyone read this, give me some hints or advices.
Thanks.

Javier wrote in news message <847f90c06203a2303921af1ff0743725@news.pcsoft>:
> Have you seen the OpenChild function?

Message forwarded from pcsoft.us.windev
Paulo Oliveira
Re: Report - how to open it as child window?
September 19, 2008 01:59PM
wy don't you try this:
create one window (win_prev) with one parameter for the report name.
and int the window code put:
iPreview(100)
-iPrintReport(parameter)

and in yor main window
openchild(win_prev,report_name)

Jonathan Buckland.pcs.crosspost
Re: Report - how to open it as child window?
September 19, 2008 03:29PM
As you have realised you don't have much control over iPreview.

One other way would be to print the report to HTML. Then you could create your own window with an HTML control. You then have full control over the window.

You could then cheat a bit and have a print button which just calls iPrint again. That way you can control printer settings etc.

Hope that helps

Jonathan

Message forwarded from pcsoft.us.windev
marcel.berman@managingbusiness.be.pcs
Re: How to export a table to excel by displayed column subscript?
September 19, 2008 06:03PM
Hi !
I had to seek a little bit because this is a litlle bit tricky !
here is a piece of code which seems to work !


LOCAL
sContent is string
sFile is string = CompleteDir(fExeDir())+"Excel.xls"
// yes ! you'll get an error when opening the file, but if you continue it
will be ok !
nLine is int = 0
nCol is int = 0
nTotalCol is int
sValue is string
tabIndices is array of 0 int
tabColTitles is array of 0 strings

// how much columns in this table
nTotalCol = TableCount(TABLE_Table1,toColumn)
Dimension(tabIndices,nTotalCol)
Dimension(tabColTitles, nTotalCol)
FOR i = 1 TO nTotalCol
// I store the name of the column
// You should get an error here if the table is empty !
tabColTitles = ExtractString(TABLE_Table1[1,i]..Name,1,"[")
END
FOR i = 1 TO nTotalCol
// I store the "display" subscript of the column
tabIndices =
TableColumnSubscript(TABLE_Table1,tabColTitles,tcpDisplay)
END
FOR ALL ROW OF TABLE_Table1
nLine++
FOR nCol = 1 _TO_ nTotalCol
// I read the data of the actual displayed column
sValue = TABLE_Table1[nLine,tabIndices[nCol]]
sContent += [(nCol = 1 ? CR ELSE TAcool smiley] + sValue
END
END
fSaveText(sFile,sContent)
ShellExecute(sFile)

I and you will have a good week-end !


--
Marcel Berman
Président de Be-Dev.be (www.be-dev.be) (Belgique)
Membre du CA de Wind'Asso (www.windasso.org) (France)
Be-Dev.be et Wind'Asso sont des associations d'utilisateurs des produits
PC-Soft
Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: