19. december 2008 - 11:48Der 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?
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.
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.
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?
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?
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.
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.
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?
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.