Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 1 Jahr, 6 Monaten
Letzter Beitrag:
vor 1 Jahr, 6 Monaten
Beteiligte Autoren:
iso, DarrenF

[WD18] Report Advice

Startbeitrag von iso am 18.04.2016 12:15

Hi

bit of advice please, i m trying to create a report in the style attached:

sample report

I ve tried to create a main report with a number of embedded sub reports but its just not working.
the main report initialises a query
The 1st sub report uses hreadfirst of that query in its query parameter to output the result of its table (works fine)
but then the next sub table uses hreadnext and so on for each sub table but they still only show the same result as the 1st sub table!

ive tried all sorts and now thinking its not possible and is there any other ways?

any help appreciated

thanks iso

Antworten:

Hey iso,

I suspect that the next (hreadnext) value isn't getting passed into you sub-report(s)... have you traced it in GO mode? I think we'll need a bit more specific info to help you fully... like; which event have you used for your processing in the main report?

Also consider:
http://help.windev.com/en-US/?1000019503

von DarrenF - am 18.04.2016 13:32
Cheers Darren sorted it you gave me an idea by tracing it so i could see where the parameters are being initialised. Solution is a bit clunky but at least it works :)


thanks again

iso

von iso - am 18.04.2016 14:25
Glad I could help... could you let us into your secret - it might help others? :cheers:

von DarrenF - am 18.04.2016 15:09
i was putting the hreadnext in the initializing of each sub report within the main report which doesnt seem to work:

so now when u run the main report it initainses a query:

HExecuteQuery(QRY_GROUP_NAMES)
HReadFirst(QRY_GROUP_NAMES)
gnGROUPID = QRY_GROUP_NAMES.GROUP_ID
gnTHELINE = 1

then on the actual sub report (opening) code i have :

QRY_GROUP_NAME_TABLES.pGroupID = gnGROUPID
HExecuteQuery(QRY_GROUP_NAME_TABLES)

gnTHELINE = 1 + gnTHELINE

HRead(QRY_GROUP_NAMES,gnTHELINE)
gnGROUPID = QRY_GROUP_NAMES.GROUP_ID


so each time it runs the sub report it initialises the correct paramater. had to add gnTHELINE as hreadnext wouldnt work on its own?

von iso - am 18.04.2016 15:24
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.