简体   繁体   English

如何在MS-Access 2007报表设计视图中不使用占位符/默认/通用图表?

[英]How do I NOT use the placeholder/default/generic chart in MS-Access 2007 report design view?

After inserting a simple pie chart in the detail section of a new report, I get a generic chart, not based on my data (labels are East, West, and North). 在新报表的详细信息部分中插入简单的饼图后,我得到的是通用图表,而不是基于我的数据(标签为East,West和North)。 I can format or alter the chart, and when I return to Report View or Print Preview, I see the chart with my data. 我可以格式化或更改图表,当我返回到“报表视图”或“打印预览”时,可以看到包含数据的图表。

Interestingly, when I am in design view and double click the chart, a datasheet is presented that I not my data. 有趣的是,当我进入设计视图并双击图表时,会显示一个数据表,而不是我的数据。 It is fake, default, generic, or placeholder data that has nothing to do with my database. 它是虚假的,默认的,通用的或占位符数据,与我的数据库无关。

How do I get the chart, while in design view, to be drawn based on my data? 在设计视图中,如何获取基于我的数据绘制的图表?

After playing around with this a bit, I have found the solution. 经过一番尝试后,我找到了解决方案。

When you add a new report to the database and then add a chart, it uses a generic placeholder chart in Design View. 当您将新报表添加到数据库中,然后添加图表时,它在设计视图中使用通用占位符图表。 Even if you save the report, it will continue to use the placeholder chart. 即使您保存报告,它也将继续使用占位符图表。

It is only after you close then reopen the database, does it use your actual data, but only after the second time you enter the Design View. 只有在关闭然后重新打开数据库之后,它才会使用您的实际数据,但是仅在第二次进入设计视图之后。

The steps to have a Report chart use your data in Design View are the following: 要使报表图表在“设计视图”中使用您的数据,请执行以下步骤:

  1. Create Report via Report Design 通过报告设计创建报告
  2. Add Chart 添加图表
  3. Save Report 保存报告
  4. Close Database 关闭数据库
  5. Open Database 打开数据库
  6. Load Report in Design View 在设计视图中加载报告
  7. Go to Report View 转到报告视图
  8. Go To Design View 转到设计视图

I don't have a copy of access 2007 to hand but try this. 我没有Access 2007的副本,但可以尝试一下。

  • Open up the query your report is based on and copy the datasheet into the clipboard 打开您的报告所基于的查询,并将数据表复制到剪贴板

  • Double click on your chart and that should bring up Microsoft Chart. 双击您的图表,应该会显示Microsoft Chart。

  • In MS Chart bring up the datasheet, it should be showing the sample data of north south east west. 在MS Chart调出数据表中,它应显示北东南西的样本数据。

  • Paste your data into that sheet, save and exit 将数据粘贴到该工作表中,保存并退出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM