Access Report to PDF loses unique URLs (1 Viewer)

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Hi Guys

This is going to sound really weird. I have managed to create an Access report that has unique URLs to each record that will take you online, to again a unique place. It all works brilliantly in the report when I have it opened in access, it goes direct to each record(online) with no problem at all.

When I use the Access program to create a PDF (or XPS), here I want PDF only, it saves the unique URL but it adds the file directory to the beginning of the URL in the PDF, so this then takes me to our company intranet (internal page) and not the unique URL. No matter what I do when converting it to PDF it will put the file directory I have saved it to in front of each unique URL. Am I going mad and not doing something. I have never seen this before and its driving me nuts.

so instead of the URL reading:

worldwideweb.uniquerecord.6458b.co.uk

In the PDF is says

c:/general/files/nick/worldwideweb.uniquerecord.6458b.co.uk

Can anyone help or make a suggestion. THANK YOU all so much. There isn't an icon with tears on it
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
Hi again

Presumably you start with www rather than worldwideweb!
Have you tried putting http:// at the start?

Unless that fixes it, please post the code you use to create PDFs from your reports.
 
Last edited:

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Hi again

I am not allowed to post links at this moment in time hence below looking a little weird (put all together to get link as I have built it)

The coding I am using is as follows:

h(tee)tps
:
/
/
planning.
Plymouth(dot)

gov(dot)
uk/
online-applications/applicationDetails(dot)do?activeTab(equals)summary&keyVal(equals)[KEYVAL]

This looks for the keyVal which is the reference number of that particular application and goes to with no trouble at all when you run the report. When I pdf it, it then looks like this.

file////cifs01/home$/KingNX/desktop (followed by the URL above).

Really not sure why it is saving the file path and adding it into the URL?

That means it just goes to my internal systems.
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
OK 2 things:

1. New members can only upload zip files (to help prevent spam)
- the restriction is lifted after 10 posts

2. Use the code tag in the toolbar - it's the # 'button'
So is that:

Code:
https://planning.Plymouth.gov.uk/online-applications/applicationDetails.do?activeTab=summary &keyVal=[KEYVAL]

No idea why it adds the
file////cifs01/home$/KingNX/desktop (followed by the URL above).

Try zipping a stripped down version of the relevant bit of your db for someone to look at.
It will probably not be me as I'm logging off shortly but hopefully someone else will step in
 

Minty

AWF VIP
Local time
Today, 04:54
Joined
Jul 26, 2013
Messages
10,355
Is the field stored as a hyperlink? If it is they don't play nice with pdf conversion.

Change it to a text field or create a text version of it in the underlying query and it will probably work.
 

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
OK 2 things:

1. New members can only upload zip files (to help prevent spam)
- the restriction is lifted after 10 posts

2. Use the code tag in the toolbar - it's the # 'button'
So is that:

Code:
https://planning.Plymouth.gov.uk/online-applications/applicationDetails.do?activeTab=summary &keyVal=[KEYVAL]
No idea why it adds the


Try zipping a stripped down version of the relevant bit of your db for someone to look at.
It will probably not be me as I'm logging off shortly but hopefully someone else will step in

Thanks but it still will not work, I suppose it is the simplest of things, will attack it next week when I am not frazzled. Thank you for all of you help so far, I really appreciate it. Have a lovely weekend.:D
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
Still here!

Just saw the reply in my email notification & noticed the space in your hyperlink after summary.

Try:
Code:
https://planning.Plymouth.gov.uk/online-applications/applicationDetails.do?activeTab=summary&keyVal=[KEYVAL]

Failing that, check out Minty's response
 
Last edited:

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Is the field stored as a hyperlink? If it is they don't play nice with pdf conversion.

Change it to a text field or create a text version of it in the underlying query and it will probably work.


I am losing the will on this one and maybe I should leave it until next week. I have tried the above and I still call not it to work. Maybe when I can post screen shots etc it may make it easier to understand. Thank you so much for your help so far, I really appreciate it. Have a lovely weekend.:D
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
Nick

I just edited my last post - have a look again.
The space is almost certainly the problem
 

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Nick

I just edited my last post - have a look again.
The space is almost certainly the problem

No luck I am afraid. I am signing off, I do not want to give up on this one, it the last report of over 50 I have written. Brain needs to rest hahahaha, getting old. Thank you:D
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
Just in case you're still there: I tried this

Code:
Sub TEST()

Dim strKeyword As String
strKeyword = "OTOUA5MMJCW00"
Application.FollowHyperlink "https://planning.plymouth.gov.uk/online-applications/applicationDetails.do?activeTab=summary&keyVal=" & strKeyword & ""
End Sub

It took me to the specified webpage
Worth a try?
 

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Just in case you're still there: I tried this

Code:
Sub TEST()

Dim strKeyword As String
strKeyword = "OTOUA5MMJCW00"
Application.FollowHyperlink "https://planning.plymouth.gov.uk/online-applications/applicationDetails.do?activeTab=summary&keyVal=" & strKeyword & ""
End Sub
It took me to the specified webpage
Worth a try?

It should take you to a unique record of an application. Will try it all next week I am getting really confused now. Sorry, I have to say it confusing me so much. Maybe when I am fresher I can give it all a go. Its not the link that's the issue as far as I can see. They all work perfectly when I run the report and can link to every unique application number I want to and it goes to the online application and page. Its when I convert to PDF it add the file location I save it to and the URL. Are we saying by changing the link or messing around with it, this issue will not happen? Sorry again for causing this issue for you guys. I am always thankful for any help.:p
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
It should take you to a unique record of an application.

Yes it did so. I did a search on the site & found a random planning application

As an experiment, I've just saved a report of mine containing a hyperlink as a PDF and the link worked absolutely fine from the PDF.

I can't think of any reason why converting to PDF would cause it.
There must be an error in your code

Leave it till Monday & post your code if you still can't fix it
Have a good weekend
 
Last edited:

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Yes it did so. I did a search on the site & found a random planning application

As an experiment, I've just saved a report of mine containing a hyperlink as a PDF and the link worked absolutely fine from the PDF.

I can't think of any reason why converting to PDF would cause it.
There must be an error in your code

Leave it till Monday & post your code if you still can't fix it
Have a good weekend

Hi ridders,

Thanks for all of the advice. The coding is as follows:

https://planning.plymouth.gov.uk=online-applicationsapplicationDetails.do=activeTab=summarykeyVal=[KEYVAL]
It looks like this in the bottom bar.
https://planning.plymouth.gov.uk/[...]/applicationDetails.do?[...]=[...]&keyVal=[...]
Ok here goes. We have a field called REFVAL (eg 17/01125/FUL) that relates to the actual application number.The system stores this as a keyVAL (OE14587896K125), again this would be a unique number the system gives it but is still linked to the REFVAL.The above link will take you to the actual application online using the keyVal as this is the system number for what we enter as the reference number (REFVAL).It works brilliantly in the report when you have it on screen and each links works and goes directly to the application for everyone to see, but as I have said in my feed when I PDF it,it seems to add the file path of where I am saving it to the beginning of each link (never had this before).:banghead::banghead::banghead: Also can I do screen shots and add them??? Thanks to everyone especially ridders.
 

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
Hi ridders,

Thanks for all of the advice. The coding is as follows:

https://planning.plymouth.gov.uk=online-applicationsapplicationDetails.do=activeTab=summarykeyVal=[KEYVAL]
It looks like this in the bottom bar.
https://planning.plymouth.gov.uk/[...]/applicationDetails.do?[...]=[...]&keyVal=[...]
Ok here goes. We have a field called REFVAL (eg 17/01125/FUL) that relates to the actual application number.The system stores this as a keyVAL (OE14587896K125), again this would be a unique number the system gives it but is still linked to the REFVAL.The above link will take you to the actual application online using the keyVal as this is the system number for what we enter as the reference number (REFVAL).It works brilliantly in the report when you have it on screen and each links works and goes directly to the application for everyone to see, but as I have said in my feed when I PDF it,it seems to add the file path of where I am saving it to the beginning of each link (never had this before).:banghead::banghead::banghead: Also can I do screen shots and add them??? Thanks to everyone especially ridders.

Yes you can post screenshots like this one which is the page opened using my code in post #11



See here for instructions https://www.access-programmers.co.uk/forums/showthread.php?t=194680

However it might save time if you could post a stripped down version of your db removing any confidential data
 

Attachments

  • Capture.PNG
    Capture.PNG
    44.9 KB · Views: 586

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43

Attachments

  • Weekly List Shot.JPG
    Weekly List Shot.JPG
    90.5 KB · Views: 133

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43

Attachments

  • Weekly List Shot.JPG
    Weekly List Shot.JPG
    90.5 KB · Views: 420

isladogs

MVP / VIP
Local time
Today, 04:54
Joined
Jan 14, 2017
Messages
18,186
If you follow the instructions EXACTLY as described in the link I gave, the image will appear like this:



All I did was copy your link into the box after clicking on the Image button in the toolbar

However it would still be easier to work on your db rather than from the image
P.S. Suggest you 'lose' my image from any future replies!
 

nickaccess

Registered User.
Local time
Today, 04:54
Joined
Jul 27, 2017
Messages
43
Thank you so much, sorry I am being an idiot a lot of this is all new to me. I did follow the instructions but it would not post, it would only post a link to the jpg, will keep trying (I am very trying). When you say a stripped down version of the database, its linked to a live ODBC so you would not be able to get anything anyway to test. I could send what I have worked on. If anything is in there its not confidential, its all public information. Let me know what you think. Thanks again and sorry for being a pain. Nick
 

Users who are viewing this thread

Top Bottom