Access 2007: Report Configuration in the Code? - ms-access

I created a report in Access 2007. How could I view and change the SQL that the report is based on? For example, I am trying to find out how to change the way the report is sorted. I would expect this is based on the original sql query generated when I ran through the report wizard. Is this stored in some property sheet? How can I view it in the actual report "object" code.

There is no point in sorting in the SQL or query on which the report is based. The report uses its own sorting and grouping which you will find on the ribbon (Access 2010) in design view for the report: Group & Sort.
The record source can be found on the property sheet for the report.

From the report's design view, view the report's properties (I right-click on the box in the upper left corner under the window's title bar.)
Then you can modify the report's recordSource property.
You'll also want to look at the way the report is grouped and sorted. I'm pretty sure it's under the View menu, but they've uninstalled 2007 as of yesterday out here, so I'm still finding where stuff is in 2010.
HTH

Related

How do I set up toggling the visibility of graph series in a Microsoft Report Builder SSRS report?

I currently have a working SSRS report in Microsoft Report Builder. The report displays both a table of the data as well as a graph of the table. What I am trying to do is make it possible for the end user to be able to filter out or turn off visibility for one or more of the series on the graph.
Here is what I am thinking as a possibility: create an "Exclusion List" list parameter in which the user can enter series names that they'd like to filter out. Then I'd modify the graph's series' filter properties such that any series with a name present in the list parameter will be filtered out.
I haven't figured out fully how to implement the above, but it seems doable to me. However, I am wondering if anyone has a simpler solution to this problem? Any suggestions would be greatly appreciated.

Can't edit old SSRS reports with Report Builder

I took over report creation/maintenance at a new job. We are using SQL Server 2012 and SSRS 2012. When I try to edit one of the older reports using Report Builder I find I can't even add a comment to some of the code in a dataset without breaking the report. This particular report has 14 parameters and all I have to do is try to add a comment line (never mind change the code) to a dataset and click OK to close the dataset edit it presents this DEFINE QUERY PARAMETERS prompt to verify the parameters. If you click OK then all the fields disappear from under the dataset in the Report Data window and the report doesn't work.
Running the report itself without trying to apply any edits still works fine, it's the editing that breaks it. I can edit other previous reports, it's just this particular report that's showing this behavior.
Finally figured it out after all this time. The SQL for this dataset has at least a dozen IF-THEN statements spread throughout the code, that keep checking for a certain input parameter that was selected. I finally simplified the previous report writer's code into one big IF-THEN-ELSE statement and now the dataset can be edited in Report Builder and Visual Studio with no problem. I'm guessing something changed in Microsoft's SSRS parsing routine between when this report was written in 2018 (where it had no problem with all those IF-THEN statements) and 2020, when the parsing failed but with no helpful error message.

SSRS 2012 custom code - Local update of Shared Dataset values - Is this scenario possible?

Assuming a fairly conventional SSRS 2012 report (in Visual Studio 2012) with a main report, a set of sub-reports, a shared dataset that is populated at the start of the report, and a shared datasource.
Is there any simple way within a sub-report's custom code (this is VBA, right?) to access the shared dataset, either to read or update records locally? (No updates back to the database itself.) I'm seeing hints out there that this is possible but no clear examples yet.
And if the above is possible, assuming that a call in the sub-report changed a record in the shared dataset, could that record change be displayed in the main report body?
Yes and No.
I think the overall concept would work but a few points won't.
I don't think you'd be able to use the report dataset with VBA. The code won't have access to the report's datasource directly. You'd probably need to use ADO to access the db from VB.
The only way to see the updated data would be to refresh the report - either manually or automatically on the timer.
I don't see how the subreport is going to figure out what to update the value to. You might have some idea that I'm not seeing right now.
The easier way I see this working would be to use parameters that default to NULL. Then select the row to update with one parameter and the value with another. Then have an UPDATE in your main query that only runs if your parameters are populated.

SSRS 2008 R2 Drill Down On-Demand to Sub Report

In SSRS 2008 R2, I was under the impression that a drill down to a sub-report would query the data on-demand.
This isn't the case when my report gets rendered.
Specifically, I have a Tablix that initially loads rows grouped by Person.
When someone clicks the drilldown icon on that Person, a subreport displays some more data pertinent to that Person.
The problem here is that every subreport is being loaded initially when the main report is being rendered. This takes forever to load. But if I remove the subreport, just for testing purposes, the report loads almost instantly.
I've tried setting the visibility of the subreport to Hide initially, then Show when the user drills down, but it didn't change anything.
I read a similar question on stackoverflow, but the answer was to use Drill-Throughs instead.
This unfortunately isn't an option in my case.
Any suggestions?
The only way to defer the data loading is to actually use a new report with and access it via Drill-Through method. This is the way to product work, and is the way inteded by Microsoft.
You can either optimize your stored procedure, limit the number of results per page or use drill-through.

Identify which queries an Access 1997 report is using to generate?

I am updating an Microsoft Access 1997 mdb. I want to find out how one of the reports are generated and I am not sure which queries the program uses to generate the report. I am only able to access the design and preview mode or the report.
Is there an easy way to identify how the report is generated? Specifically which queries, tables, etc are used.
from the report design view, view the report's properties, then the recordSource property