如何制作动态数据集市? [英] how to make a dynamic datareport?

查看:49
本文介绍了如何制作动态数据集市?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要开发一个动态的数据区域。

这里用动词这个词我的意思是报告的内容会根据用户的输入而有所不同。


例如:我正在进行搜索操作。搜索结果会根据输入而有所不同。


所以我需要知道如何将不同的结果映射到datareport。


还有一件事,我需要通过编程完成所有这些工作,我没有使用Dataenvironment和所有这些东西。


需要帮助!!!!


提前感谢

问候

vishwas

解决方案

hi

这有点棘手。这里有一些提示

1 .....你需要创建一个连接字符串。

假设RS在你的连接字符串中。

RS 。打开您的查询,Conn,adOpenKeyset,adLockOptimistic


2 ...设置报告的数据源和数据成员属性

假设RptInvoice是您的报告

使用RptInvoice

Set .DataSource = Nothing

.DataMember =""

设置.DataSource = RS.DataSource


3 ...设置控件。

假设您有lblName,lblAddress作为您的控件


.Sections(" header")。Controls(" lblName")。Caption = RS。字段(" company_name")

.Sections(" header")。Controls(" lblAddress")。Caption = RS.Fields(" address")

。节(标题)。控制(lblCity)。标题= RS.Fields(city)

。节(标题)。控制(") lblPostalCode")。Capt ion = RS.Fields(" postal_code")

.Sections(" header")。Controls(" lblPhoneNo")。Caption = RS.Fields(" phone_number") ;)



hi

这有点棘手。这里有一些提示

1 .....你需要创建一个连接字符串。

假设RS在你的连接字符串中。

RS 。打开您的查询,Conn,adOpenKeyset,adLockOptimistic


2 ...设置报告的数据源和数据成员属性

假设RptInvoice是您的报告

使用RptInvoice

Set .DataSource = Nothing

.DataMember =""

设置.DataSource = RS.DataSource


3 ...设置控件。

假设您有lblName,lblAddress作为您的控件


.Sections(" header")。Controls(" lblName")。Caption = RS。字段(" company_name")

.Sections(" header")。Controls(" lblAddress")。Caption = RS.Fields(" address")

。节(标题)。控制(lblCity)。标题= RS.Fields(city)

。节(标题)。控制(") lblPostalCode")。Capt ion = RS.Fields(" postal_code")

.Sections(" header")。Controls(" lblPhoneNo")。Caption = RS.Fields(" phone_number") ;)



非常感谢

但是它会一次又一次地显示rs.recordcount次的第一条记录。


wat可能是它的可能溶胶吗?


提前感谢

问候

vishwa s



非常感谢

但它会一次又一次地显示rs.recordcount次的第一条记录。


wat可能是它的可能溶胶?


提前感谢

问候

vishwas



需要帮助!!!


问候

vishwas


i need to develop a dynamic datareport .
here by the word dynamic i mean that the contents of the report will vary according to the users input.

for eg : i am doing a search operation.and the result of the search will vary according to the input.

so i need to know how to map that varying result with the datareport.

and one more thing that i need to do all these thing with programming, i am not using the Dataenvironment and all those things.

help needed !!!!

thanks in advance
regards
vishwas

解决方案

hi
It''s little tricky. here some tips
1..... you need to create a connection string.
suppose RS in you r connection string.
RS.Open "your query ", Conn, adOpenKeyset, adLockOptimistic

2... Set data source and data members properties of your report
suppose RptInvoice is your report
With RptInvoice
Set .DataSource = Nothing
.DataMember = ""
Set .DataSource = RS.DataSource

3... set controls.
suppose you have lblName, lblAddress as your controls

.Sections("header").Controls("lblName").Caption = RS.Fields("company_name")
.Sections("header").Controls("lblAddress").Caption = RS.Fields("address")
.Sections("header").Controls("lblCity").Caption = RS.Fields("city")
.Sections("header").Controls("lblPostalCode").Capt ion = RS.Fields("postal_code")
.Sections("header").Controls("lblPhoneNo").Caption = RS.Fields("phone_number")


hi
It''s little tricky. here some tips
1..... you need to create a connection string.
suppose RS in you r connection string.
RS.Open "your query ", Conn, adOpenKeyset, adLockOptimistic

2... Set data source and data members properties of your report
suppose RptInvoice is your report
With RptInvoice
Set .DataSource = Nothing
.DataMember = ""
Set .DataSource = RS.DataSource

3... set controls.
suppose you have lblName, lblAddress as your controls

.Sections("header").Controls("lblName").Caption = RS.Fields("company_name")
.Sections("header").Controls("lblAddress").Caption = RS.Fields("address")
.Sections("header").Controls("lblCity").Caption = RS.Fields("city")
.Sections("header").Controls("lblPostalCode").Capt ion = RS.Fields("postal_code")
.Sections("header").Controls("lblPhoneNo").Caption = RS.Fields("phone_number")


thanks a lot
but it is displaying the first record again and again for rs.recordcount times.

wat can be the probable sol for it?

thanks in advance
regards
vishwas


thanks a lot
but it is displaying the first record again and again for rs.recordcount times.

wat can be the probable sol for it?

thanks in advance
regards
vishwas


help needed!!!

regards
vishwas


这篇关于如何制作动态数据集市?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆