How to pass parameters to XtraReport in code

70 篇文章 1 订阅

https://www.devexpress.com/Support/Center/Question/Details/T254029/how-to-pass-parameters-to-xtrareport-in-code

I have a store procedure and a webform(aspx.net) with ASPxDocumentViewer1 how i can send parametters programmatic to th report.

the report is bind to the store procedure i use vb.net

Hi Francisco,

To accomplish this task, utilize the approach demonstrated in the following help topic:
How to: Silently Pass a Parameter's Value

In short, you need to create a Report instance in the Page.Load event handler, assign the required parameter values, and then pass your Report instance to the ASPxDocumentViewer.Report property:

 

[C#]

protected void Page_Load(object sender, EventArgs e) { XtraReport1 report = new XtraReport1(); report.Parameters["yourParameter1"].Value = firstValue; report.Parameters["yourParameter2"].Value = secondValue; ASPxDocumentViewer1.Report = report; }

 

https://docs.devexpress.com/XtraReports/DevExpress.XtraReports.UI.XtraReport.Parameters

This document provides general information on query parameters and describes common ways of utilizing parametrized SQL queries to filter data on the data source level.

https://docs.devexpress.com/XtraReports/17387/detailed-guide-to-devexpress-reporting/shape-report-data/use-report-parameters/query-parameters

https://docs.devexpress.com/WindowsForms/3434/controls-and-libraries/printing-exporting/examples/print-preview/how-to-preview-export-and-print-an-xtrareport

https://docs.devexpress.com/XtraReports/2596/create-end-user-reporting-applications/winforms-reporting/print-preview/quick-start/create-a-custom-print-preview

https://docs.devexpress.com/XtraReports/2595/get-started-with-devexpress-reporting/create-a-simple-data-aware-report

https://docs.devexpress.com/WindowsForms/3434/controls-and-libraries/printing-exporting/examples/print-preview/how-to-preview-export-and-print-an-xtrareport

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值