Reports with query parameters

Arndt Weinmann arndt.weinmann at gmail.com
Sun Mar 10 15:52:09 CDT 2013


Sorry, my error. I was talking about using only Valentina Studio  for
creating and generating reports.

Yes, the reports have different layouts.

2013/3/10 Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com>

> On 3/10/13 9:55 PM, "Arndt Weinmann" <arndt.weinmann at gmail.com> wrote:
>
> > I have different reports. I would like to use single query for all
> reports.
> > This would be feasible, if I could set the parameters from within the
> report.
>
> I do not catch why parameter should come from report.
>
> > e.g.
> > select * from trials where status=$P(trial_status)
> >
> > I would like to set trial_status to like RECRUITING or FINISHED to
> create the
> > reports.
>
> So reports for RECRUITING and FINISHED will have different layout?
>
>
> =======
> Let me try to explain as I see it.
>
>
> EXISTS TWO main STEPS
>
> 1) design reports in VSTUDIO
> 2) USAGE of them in e.g. REALbasic/PHP code
>
>
>
>
> ========
> 1) When you design in Vstudio, you use some TEST db
> And you can use some TEST queries stored in projects,
> Just because to see some preview you need have that
>   TEST DB + TEST QUERY,
>
> BUT
>
> 2) WHEN you work from RB code,
> You will send QUERIES from your CODE,
> And that queries stored in project will NOT be used actually.
>
> AND you RB app will use most probably OTHER databases.
> Same report can use data from mySQL and Postgre and Valentina DB.
>
>
> So in your RB code, you can define different queries for same report.
> Usually will differ only  WHERE part. Exactly as you want.
>
>
> Dim q1, q2 as string
> q1 = "select * from trials where status= 'RECRUITING'"
> q2 = "select * from trials where status= ' FINISHED '"
>
>  res1 = proj.MakeNewReport( "report1", q1 )
>
>  res2 = proj.MakeNewReport( "report1", q2 )
>
>  res3 = proj.MakeNewReport( "report2", q2 )
>
>
>
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20130310/faf4558d/attachment.html>


More information about the Valentina mailing list