Avatar billede moso Nybegynder
19. december 2008 - 11:48 Der er 14 kommentarer og
1 løsning

Hvordan opdateres Unbound Object i rapporter?

Jeg har behov for at indsætte et visio dokument i en rapport. Input er baseret på vedhæftede filer i en liste hentet fra Sharepoint. Mit problem opstår når jeg forsøger at opdatere Source Doc, da det ser ud til at den oprindelige reference til den første visio fil 'gemmes' uanset hvad jeg gør.
Jeg har prøvet at erstatte den vha. vb script, men uden held.
Er der nogen der har prøvet samme udfordring - og måske endda fundet en løsning?
Avatar billede terry Ekspert
19. december 2008 - 12:13 #1
Have you had success showing a Visio document in an Access report?

If you already know the name of the file which you download and the destination file, then why do you need to update the source doc?

Youcould try opening the report in design mode then using code alter the Source doc and then save the report Then open it again in  normal mode.


P.S. Dont forget you still have another question opened
Avatar billede moso Nybegynder
19. december 2008 - 12:33 #2
Hi Terry
I have altered Source Doc, but it doesnt kick in? I guees that where the problem lies...
Avatar billede terry Ekspert
19. december 2008 - 12:57 #3
Hi
"Have you had success showing a Visio document in an Access report?"
If you have the Visio document on you rlocal PC and alter the source doc manually, does it work? I've never tried working with Visio doc in Access so I just want to know if you have had success with this?

I'm off very shortly but will take a look later today.
Avatar billede moso Nybegynder
19. december 2008 - 13:32 #4
Yes - I can see the diagram without any problems - just cannot update it according to the value in the next row.

amd

No - After having inserted the visio file the first time, it kinda snaps to the same file no matter what I do with the source doc.
Avatar billede terry Ekspert
19. december 2008 - 16:57 #5
If I understand the problem correctly you are trying to show a number of records and you want to be able to show a different visio document for each record (row)?

If so then I think waht you want is a field which contains the file name of the Visio document you want to show. So the field in the report will be BOUND.
Avatar billede moso Nybegynder
04. januar 2009 - 12:49 #6
Hi Terry. Been on vacation.
This is what I have allready done, but the report doesnt update the Source Doc value once its set in the first record. Meaning that I can only import the first record, the rest of them are "over writed" by the first one. Make sence?
Avatar billede terry Ekspert
04. januar 2009 - 13:40 #7
Hope you had a good vacation.

Is it possible for you to send an example of your db with the table containing the path to visio documnets etc and also the report. And a couple of visio files?
Avatar billede moso Nybegynder
04. januar 2009 - 19:27 #8
Sure thing. I'll try to create a dummy database with files etc. tomorrow. Send it where?
Avatar billede terry Ekspert
04. januar 2009 - 19:52 #9
ekspertenATsanthell.dk
AT=@

I may not have too much time tomorrow but I'll take a look as soon as I can.
Avatar billede moso Nybegynder
05. januar 2009 - 11:44 #10
Can CreateReportControl be used?
Avatar billede terry Ekspert
05. januar 2009 - 12:35 #11
I'm not sure why you would want to use CreateReportControl. The report and control already exists so we need to find out why a BOUND object doesnt show the right file.

If you can send me an example then I'll take a look ASAP.
Avatar billede moso Nybegynder
05. januar 2009 - 21:06 #12
In your mail...
Avatar billede moso Nybegynder
07. januar 2009 - 13:04 #13
Hi Terry
I'm pretty sure that by using CreateReportControl it could work - but my skills are not good enough.
I'll try and explain what i'm thinking:
Use CreateReportControl to create the object and assign prober values. Delete it againg, create next, delete etc.

What do you think?
Avatar billede terry Ekspert
07. januar 2009 - 13:23 #14
I'm not sure but the way I look at it is like this.
When a control is added to the detail section of a report there is only ONE control and that is used for all records. So using CreaReportControl only (I think) creates one control which you give one set of values.
If the control is undbound (at least in a form) then changing the values effects all records. I must be honest but I'm not sure if this alos applies for unbound controls in a report. I seem to recall that it may ne be, but I'll take a look.
But even if it is possible to alter the values then we need to find and event which is fired (performed) for each detail record and then chnage the values. In an Access version < 2007 it seems that the format event can be used for this, but in your dB in 2007 it deosnt seem to get fired for each record. So it isnt possible to change the values.
In a BOUND control it shouldnt be necessary to alter the values in code, but I couldn tget it to work in your dB although I'll keep trying.

Why do you want to delete the control again, wouldnt you just end up with one control showing the last set of values?
Avatar billede moso Nybegynder
23. februar 2009 - 16:01 #15
lukker
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester