Sorry, my error. I was talking about using only Valentina Studio for creating and generating reports.<div><br></div><div>Yes, the reports have different layouts.<br><br><div class="gmail_quote">2013/3/10 Ruslan Zasukhin <span dir="ltr"><<a href="mailto:ruslan_zasukhin@valentina-db.com" target="_blank">ruslan_zasukhin@valentina-db.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 3/10/13 9:55 PM, "Arndt Weinmann" <<a href="mailto:arndt.weinmann@gmail.com">arndt.weinmann@gmail.com</a>> wrote:<br>
<br>
> I have different reports. I would like to use single query for all reports.<br>
> This would be feasible, if I could set the parameters from within the report.<br>
<br>
</div>I do not catch why parameter should come from report.<br>
<div class="im"><br>
> e.g. <br>
> select * from trials where status=$P(trial_status)<br>
><br>
> I would like to set trial_status to like RECRUITING or FINISHED to create the<br>
> reports.<br>
<br>
</div>So reports for RECRUITING and FINISHED will have different layout?<br>
<br>
<br>
=======<br>
Let me try to explain as I see it.<br>
<br>
<br>
EXISTS TWO main STEPS<br>
<br>
1) design reports in VSTUDIO<br>
2) USAGE of them in e.g. REALbasic/PHP code<br>
<br>
<br>
<br>
<br>
========<br>
1) When you design in Vstudio, you use some TEST db<br>
And you can use some TEST queries stored in projects,<br>
Just because to see some preview you need have that<br>
TEST DB + TEST QUERY,<br>
<br>
BUT<br>
<br>
2) WHEN you work from RB code,<br>
You will send QUERIES from your CODE,<br>
And that queries stored in project will NOT be used actually.<br>
<br>
AND you RB app will use most probably OTHER databases.<br>
Same report can use data from mySQL and Postgre and Valentina DB.<br>
<br>
<br>
So in your RB code, you can define different queries for same report.<br>
Usually will differ only WHERE part. Exactly as you want.<br>
<br>
<br>
Dim q1, q2 as string<br>
q1 = "select * from trials where status= 'RECRUITING'"<br>
q2 = "select * from trials where status= ' FINISHED '"<br>
<br>
res1 = proj.MakeNewReport( "report1", q1 )<br>
<br>
res2 = proj.MakeNewReport( "report1", q2 )<br>
<br>
res3 = proj.MakeNewReport( "report2", q2 )<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
--<br>
Best regards,<br>
<br>
Ruslan Zasukhin<br>
VP Engineering and New Technology<br>
Paradigma Software, Inc<br>
<br>
Valentina - Joining Worlds of Information<br>
<a href="http://www.paradigmasoft.com" target="_blank">http://www.paradigmasoft.com</a><br>
<br>
[I feel the need: the need for speed]<br>
<br>
<br>
_______________________________________________<br>
Valentina mailing list<br>
<a href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</a><br>
<a href="http://lists.macserve.net/mailman/listinfo/valentina" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br>
</div></div></blockquote></div><br></div>