Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 7 Monaten
Letzter Beitrag:
vor 2 Jahren, 7 Monaten
Beteiligte Autoren:
DarrenF, DerekT

[WD20] Report based on a Table control [SOLVED]

Startbeitrag von DarrenF am 01.11.2015 13:38

Hi guys,

I have a Table control and I've generated a Report based on table.

Does anyone know of a way to get details (possibly as parameters), from the window to the report based on the table control?


Re: [WD20] Report based on a Table control

AFAIK the report will always display the content of the table - you have the option of All or Selected Only.
Why do need to send parameters and more importantly I guess 'when'.

von DerekT - am 01.11.2015 16:41

Re: [WD20] Report based on a Table control

Hi Derek,

The reason I ask is because the contents of the table control contains a specific years worth of info (year is user selected) and I want to display that on the report somewhere to give it some kind of context.

I also change some of the column headers of the table control to reflect the year selected by the user. I was hoping that the report would reflect the "look" of the table at runtime, but because the report is based on the "design" of the table it seems as though this isn't possible either.

Ah well, looks like I'll have to go back to the drawing-board and create the report manually so that I can make it more dynamic. The "report based on table" is a fixed format and can't do things dynamically. I suppose if one of the columns contained some relevant data, then it could be made to be more dynamic using code in the report itself. Unfortunately, having a date in the rows of the table/report wouldn't make much business sense.

von DarrenF - am 01.11.2015 17:00
Here's how to do it.... after a little experimentation it's quite obvious...

First and foremost, don't use the automatic Button control that WD proposes!

In the "Opening" event of the report, add "PROCEDURE rpt name(params)" as you would if you were creating a report manually.
Then create your own Button control (or event) with code to iPrintReport and pass your parameter(s).
You can then add controls and code to the report, but you still have to follow the rules of reports created from tables - here; http://doc.pcsoft.fr/en-US/?1011012

von DarrenF - am 01.11.2015 17:38
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.