嘿伙计们。只是想知道如果有人知道的创建方法的迷你的图表上的形式在MS访问。该图表建设者不真的很好工作以创造迷你的图表(图,小)。

只是好奇,谢谢!

有帮助吗?

解决方案

我不认为这是建立在对在MS Access迷你图图什么。你必须使用第三方控制并随着您的应用程序部署到所有用户或使用MS Excel的嵌入式控制以显示图形。

其他提示

有一个VBA动迷你方案的特色在访问博最近: http://blogs.office.com/b/microsoft-access/archive/2011/02/10/power-tip-add-sparkline-like-graphs-to-access-reports.aspx

他们有一个.mdb以及一。accdb样的文件可供使用,所以我猜它的工作跨越多个版本。

我开始与 VBA供电火花但不喜欢,它期待低分辨率,我不能用它连续形式(它仅适用于报告)。我想出了解决的办法是建立在Excel图表和保存图表图像中的子文件夹。然后,它很容易在图像上的报告或连续的形式联系起来。我的图表更新夜间,虽然Excel图表建筑物循环环路是真快。缓慢的部分生成图表所需要的数据,这可能取决于你在什么图表有所不同。

我创建Excel中的一个模板,它曾与外观和分辨率,我想一个图表。我在访问写了一个VBA程序来打开通过,我想图表的记录的Excel工作表和循环。片材被传递给此函数(下面),它加载图表数据的记录,并将其传递到Excel,它可以自动刷新“SparkChart”对象。然后,将图像保存到子文件夹。 Excel表单保持打开状态以及与每个循环再使用。我不包括与回路的功能。

下面就是我的图表看起来像在Excel中:

“Excel文件”

下面是在连续的形式示出的迷你的示例:

“数据质量信息中心例如”

Public Function fCreateSparklineChart(pDQ_ID As Long, pChartSheet As Object) As Boolean
' Pass in a Dashboard Query ID for data that has already compiled into the top-n
' temp table and the data will be copied to the passed pChartSheet in Excel.  This
' will update a chart object, then the chart is saved as a .png file.

    Dim strSQL As String
    Dim strChartPath As String
    Dim rs As DAO.Recordset

    On Error GoTo ErrorHandler

    ' Get chart data from a table that has already been compiled with 
    ' min and max values as percentages so the lowest value is 0
    ' and the highest value is 100.
    strSQL = "  SELECT DQ_ID, Trend_Value, " & _
            " IIf(Trend_Value=0,0,Null) AS Min_Point, " & _
            " IIf(Trend_Value=100,100,Null) AS Max_Point " & _
            " FROM " & DASHBOARD_TMP_TABLE & _
            " WHERE (DQ_ID=" & pDQ_ID & ") "
    strSQL = strSQL & " ORDER BY RowNo "

    Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)

    If rs.RecordCount > 0 Then

        pChartSheet.Range("A1").CurrentRegion.Clear
        pChartSheet.Range("A1").CopyFromRecordset rs
        pChartSheet.ChartObjects("SparkChart").Chart.SetSourceData pChartSheet.Range("rngData")

        ' Use a filename that includes the record ID.
        strChartPath = CurrentProject.Path & "\Images\Sparkline_DQ_ID_" & Format(pDQ_ID, "0000") & ".png"

        ' Delete the file if it already exists.
        DeleteFile strChartPath

        ' Save the Excel chart as a png file.
        pChartSheet.ChartObjects("SparkChart").Chart.Export strChartPath, "png"

        fCreateSparklineChart = True
    End If

Exit_Function:
    Exit Function

ErrorHandler:
    fCreateSparklineChart = False

    MsgBox "Error #" & err.Number & " - " & err.Description & vbCrLf & "in procedure fCreateSparklineChart of basSparkline"
    GoTo Exit_Function

End Function

我一直在想建立一个YouTube视频解释我是如何建立这个数据质量仪表板,图表数据的趋势。让我知道,如果你有兴趣,我可以鼓励这样做。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top