How to run a report while just entering parameters once? (1 Viewer)

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
The report loads and has data when I run it from the development side. When I upload the database to the server, the split database (the one with just the reports available to the user), the report does not open at all. I don't make any amendments to the split one, it does it automatically once on the server. Not sure why it won't open (or If it has opened, why it doesn't show on the screen).
 

vbaInet

AWF VIP
Local time
Today, 07:37
Joined
Jan 22, 2010
Messages
26,374
If it's not loading then I suspect code isn't running at all. Are you sure any kind of code is actually running? You can test it with a Msgbox called from the click event of a button.
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
I'll check in the morning and report back. Looking at how the other reports on their have been set up, there is quite a bit of code in the background.

I've tried to copy and change the parts that are relevant to the command but no luck yet.

Thanks again and for being patient with me.

Jim
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Hello! I've managed to fix this myself.

The only problem I'm having now is I've tidied up all the reports that make the subreports in the final report (I ensured boxes are lined up, fonts are correct etc.) However when I run the report, it doesn't show the changes I've made. Is there a way of refreshing the subreports in the final report?

Thanks,

Jim
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
and now, when I click print, it sends 2500 pages to the printer (in print preview, it seems to be looping, once it gets to the last page of the report it repeats the report again and again for the same ClientID). It wasn't doing that before!

Jaim
 
Last edited:

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Nor do I! Odd its repeating the report over and over again.
 

vbaInet

AWF VIP
Local time
Today, 07:37
Joined
Jan 22, 2010
Messages
26,374
I don't know what sort of "tidying up" you've done.
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Some of the lines/boxes on the subreports were not neatly aligned so I just moved those around. They didn't update on the final report, just in the separate reports. There wasn't anything major done.

As to why it has started printing many times again, no idea.
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Right, I've restarted from the version that you did. Amended the criteria in each query to match what you did. It works again but when I go to print preview, 2 of the subreprots aren't showing. Which was the original problem earlier on.
 

vbaInet

AWF VIP
Local time
Today, 07:37
Joined
Jan 22, 2010
Messages
26,374
I've gone into every subreport and replaced what you had with this "[Forms]![Form1]![lstClients]" which is what I had advised you should do. A copy and paste from one of the query's I did to all the other queries that you have. It's really not that hard to do. Anyway, I've done all of them so see attached.

If any of the subreports isn't showing any data it's simply because that ClientID is not returning any records in the query.
 

Attachments

  • jimtimber.accdb
    1.3 MB · Views: 90

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Hi vbaInet. Thanks for your help again.

R.E. "if any of the subreports isn't showing any data it's simply because that ClientID is not returning any records in the query.", if you look at the print preview, its not bringing through the "qry_on-attend" report, the "qry_cancellations" report or the "qry_other qualifications1" report for any records, even for those with records. Even for those without any data, i would have thought it would still print the parts that aren't data applicable (i.e.the paragraphs of text). I've checked that they are:

1 - visible in properties, they are
2 - there is a record source, there is.

So not sure what is causing it :/
 

vbaInet

AWF VIP
Local time
Today, 07:37
Joined
Jan 22, 2010
Messages
26,374
You understand how your report should look better than me.
I had already tested it in the query itself and it pulled through the record. So first of all test those reports as standalone. And make sure that you're not linking them via Master/Child Fields properties.
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Hi VbaInet, there is nothing in the Child/Master fields. The reports individually all run fine, as do the queries. For some reason it won't show the 3 reports above in the final doc. Very strange. It doesn't show in the version you did for me yesterday either.
 

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Thank you...and sorry for causing frustration. It's just weird it's not showing those reports.
 

vbaInet

AWF VIP
Local time
Today, 07:37
Joined
Jan 22, 2010
Messages
26,374
Ok, I've just had a look and I see what you're talking about and it's not a weird behaviour. If there's no relating record the subreport will remain hidden in Print Preview.

Using the record/selection "134, Francis, Leigh, ZZTV" there aren't any relating records in the reports "qry_Other Qualifications1" and "NonAttendIn12Months". I've highlighted those two reports in orange and you should look behind both subreports (i.e. move the subreport down or up) to see what I've done.
 

Attachments

  • jimtimber.accdb
    1.3 MB · Views: 93

jimtimber

Registered User.
Local time
Today, 07:37
Joined
Apr 25, 2014
Messages
118
Hi vbaInet,

Thank you very much for this, its nearly complete!

Actually, i see what you've done, you've added the parts of the reports not showing to the master report.

Out of interest, can i then delete the sub reports or are they still needed?

Thanks again.

Jim
 

vbaInet

AWF VIP
Local time
Today, 07:37
Joined
Jan 22, 2010
Messages
26,374
I showed you two ways:

1. Copy the texboxes and place them behind the subreport
2. Make a copy of the subreport and in the copy remove the Record Source of the report and also remove the Control Source of each control. Then place this cloned subreport and place it behind the original subreport.

Basically the original subreport will always disappear when there's no relating record so whatever is behind it will become visible.
 

Users who are viewing this thread

Top Bottom