This one has me dumbfounded...
I have a report (cover page) that is used for various databases. The varying or database specific report sub report is placed on this Main report.
Yhe main report can be print previewed look fine, manually exported to PDF and still look fine but when exported via docmd.outputo, the subreport is not present.
The bizarre thing about this case is the same subreport is used with a different main report and works fine. This and other things noted below suggest it is likely the main report at issue.
The below code excerpt is how it is run.
Notably varOutputFormat is passed in and is equal to acFormatPDF
I tried it with the lines uncommented and still no luck.
I made sure my windows default printer was set to something that normally works and that the reports printer is set to default printer.
I ran the database through my process that exports all the non-table objects to text files and reimported the tables and then the text files to eliminate corruption issues.
The width of the subreport matches the main report and subreport control.
The subreport while having data in grouping headers has no detail section display. It does have a height greater than 0 and Can shrink set to yes. (This seems to crash Access 365 in some cases, part of the kitchen sink)
Playing with it, I set the detail section background where the subreport is and that color is not showing in the exported version nor if I add data in the main report.
It seems like it is just killing the detail section altogether. The detail section and all the controls in it are set visible.
The only thing novel about these reports is they have on open events that set the recordsource to a SQL statement 'passed' via a Tempvars specific to each. This however works countless other places.
I've run out of good and bad ideas... Please share yours.
I have a report (cover page) that is used for various databases. The varying or database specific report sub report is placed on this Main report.
Yhe main report can be print previewed look fine, manually exported to PDF and still look fine but when exported via docmd.outputo, the subreport is not present.
The bizarre thing about this case is the same subreport is used with a different main report and works fine. This and other things noted below suggest it is likely the main report at issue.
The below code excerpt is how it is run.
Notably varOutputFormat is passed in and is equal to acFormatPDF
Code:
'DoCmd.OpenReport strReport, acViewPreview
DoCmd.OutputTo acOutputReport, strReport, varOutputFormat, strFile
'DoCmd.Close acReport, strReport, acSaveNo
I tried it with the lines uncommented and still no luck.
I made sure my windows default printer was set to something that normally works and that the reports printer is set to default printer.
I ran the database through my process that exports all the non-table objects to text files and reimported the tables and then the text files to eliminate corruption issues.
The width of the subreport matches the main report and subreport control.
The subreport while having data in grouping headers has no detail section display. It does have a height greater than 0 and Can shrink set to yes. (This seems to crash Access 365 in some cases, part of the kitchen sink)
Playing with it, I set the detail section background where the subreport is and that color is not showing in the exported version nor if I add data in the main report.
It seems like it is just killing the detail section altogether. The detail section and all the controls in it are set visible.
The only thing novel about these reports is they have on open events that set the recordsource to a SQL statement 'passed' via a Tempvars specific to each. This however works countless other places.
I've run out of good and bad ideas... Please share yours.