HighXplosive
New member
- Local time
- Today, 02:11
- Joined
- Aug 25, 2008
- Messages
- 9
- I have a report that is unbound. It consists of many controls, subreports and other formatting elements.
- Each control, textboxes or listboxes, is bound to an SQL query, written to extract a very precise piece of information from the database as a whole.
- Each of these SQL queries includes a piece of code whereby it imposes a date range on the data that is read for this report.
- I have a form that takes in a from date and to date in two distinct text box controls. This form also includes a button that generates the report mentioned above.
- The button calls a macro that opens the target report than closes the form where the dates are entered.
- On print preview the report is perfectly formatted and correct.
- On report view it is a complete mess, but isn't an issue, as long as it works on paper it's fine.
- Problem: when the operator prints the generated report (generated meaning two dates were entered correctly as a date range the report looks fantastic on print preview) it continuously asks for two distinct parameters.
These two distinct parameters are in fact the from and to date, as embedded in each of the many, many SQL queries in this report.
What should happen is that this report should, when the print task is selected, simply print as it is displayed on print preview, with zero fuss.
It doesn't. Note one important fact: if the from and to date parameters are supplied each time it asks, then the report still prints correctly. But it shouldn't ask at all as it theoretically already knows.
- Note that the report controls are bound to SQL queries as said above.
- Note that the report subforms are bound to SQL queries themselves.
- Note that the report itself is unbound: it simply exists with these above queries embedded.
- Note that there is one control on the report that isn't bound to an SQL query that is simply a text box bound to a expression that displays the from date and to date. This control appears with the #Name? error.
Please advise.
- Each control, textboxes or listboxes, is bound to an SQL query, written to extract a very precise piece of information from the database as a whole.
- Each of these SQL queries includes a piece of code whereby it imposes a date range on the data that is read for this report.
- I have a form that takes in a from date and to date in two distinct text box controls. This form also includes a button that generates the report mentioned above.
- The button calls a macro that opens the target report than closes the form where the dates are entered.
- On print preview the report is perfectly formatted and correct.
- On report view it is a complete mess, but isn't an issue, as long as it works on paper it's fine.
- Problem: when the operator prints the generated report (generated meaning two dates were entered correctly as a date range the report looks fantastic on print preview) it continuously asks for two distinct parameters.
These two distinct parameters are in fact the from and to date, as embedded in each of the many, many SQL queries in this report.
What should happen is that this report should, when the print task is selected, simply print as it is displayed on print preview, with zero fuss.
It doesn't. Note one important fact: if the from and to date parameters are supplied each time it asks, then the report still prints correctly. But it shouldn't ask at all as it theoretically already knows.
- Note that the report controls are bound to SQL queries as said above.
- Note that the report subforms are bound to SQL queries themselves.
- Note that the report itself is unbound: it simply exists with these above queries embedded.
- Note that there is one control on the report that isn't bound to an SQL query that is simply a text box bound to a expression that displays the from date and to date. This control appears with the #Name? error.
Please advise.
Last edited: