Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 9 Jahren, 11 Monaten
Letzter Beitrag:
vor 9 Jahren, 10 Monaten
Beteiligte Autoren:
Zeljko Bobic.pcs.crosspost, marcel.berman@managingbusiness.be.pcs, Jonathan Buckland.pcs.crosspost, Paulo Oliveira, Javier.pcs.crosspost

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

Startbeitrag von Zeljko Bobic.pcs.crosspost am 14.08.2008 08:56

Is this question so hard that noone knows the answer???

Message forwarded from pcsoft.us.windev

Antworten:

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

Have you seen the OpenChild function?

Message forwarded from pcsoft.us.windev

von Javier.pcs.crosspost - am 18.09.2008 07:39

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

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 :
> Have you seen the OpenChild function?

Message forwarded from pcsoft.us.windev

von Zeljko Bobic.pcs.crosspost - am 19.09.2008 11:26

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

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)



von Paulo Oliveira - am 19.09.2008 11:59

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

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

von Jonathan Buckland.pcs.crosspost - am 19.09.2008 13:29

Re: How to export a table to excel by displayed column subscript?

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 TAB)] + 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


von marcel.berman@managingbusiness.be.pcs - am 19.09.2008 16:03
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.