1. Roddney Colman
  2. Report Editor
  3. 金, 11月 22 2019, 06:55 PM
  4.  メールで購読
i use valentina with sql server is work fine but i need filter some report data how can i send my query in run time
コメント
There are no comments made yet.
Sergey Pashkov 承諾済みの回答
Hello Roddney,

1) You can add a condition to MakeNewReport call

For example, normally the report shows all invoices


my_project.MakeNewReport(
"report_1",
"mssql://...",
"SELECT * FROM invoices" )


But it also can show a subset or even a single invoice with a specified ID


my_project.MakeNewReport(
"report_1",
"mssql://...",
"SELECT * FROM invoices WHERE invoice = 1" )


2) In the latest versions (like 9.3+) you can use parameters for this task if you define the query in report like:

SELECT * FROM invoices $!P( pFilter )


$!P( pFilter ) will be replaced with condition (or an empty string if not specified)

And then you don't need to specify your base query again, just pass an empty string for it:


my_report=my_project.MakeNewReport(
"report_1",
"mssql://...",
"" )


Add condition when necessary

my_report.SetParameterValue( "pFilter", "WHERE invoice = 1" )
コメント
There are no comments made yet.
  • ページ :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories